Messages in this thread | | | Date | Fri, 16 Jun 2006 10:29:35 -0700 | From | Ashok Raj <> | Subject | Re: [RFC][PATCH] avoid cpu hot remove of cpus which have special RT tasks. |
| |
On Sat, Jun 17, 2006 at 01:46:23AM +0900, KAMEZAWA Hiroyuki wrote: > + if (tsk->mm && stop_derailed_process) { > + force = 1; > + printk(KERN_INFO, "process %d (%s) is stopped " > + "by stop_derailed_process sysctl\n", > + tsk->pid, tsk->comm); > + } > } > __migrate_task(tsk, dead_cpu, dest_cpu); > + if (force) > + force_sig_specific(SIGSTOP, tsk); > } >
Humm, dont know killing tasks is a good thing, unless the thread specifically asked for it.
I dont know if there are bad cases, but if a thread just switched itself to get to some per cpu data its best to ensure it does that consistently.
i see some code in kernel that does this today
cpumask_t save_cpus_allowed = current->cpus_allowed; cpumask_t new_cpus_allowed = cpumask_of_cpu(cpu); set_cpus_allowed(current, new_cpus_allowed); (*fn)(arg); set_cpus_allowed(current, save_cpus_allowed);
Probably such code should use a get_cpu()/put_cpu() to ensure they do this on the right context to ensure they are not switched.
Should we have this flag on a per-task so we know if this task should be killed, or could be migrated without damage (assuming its going to run slow, but nothing critically bad will happen)
Iam just worried if killing them globally without giving them a chance is any good and favorite apps such as databases will have probably have ill effects.
Cheers, ashok - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |