[PATCH 1/1] workqueue: don't migrate pending works from the dead CPU

2007-02-04 Thread Oleg Nesterov
Currently CPU_DEAD uses kthread_stop() to stop cwq->thread and then transfers cwq->worklist to another CPU. However, it is very unlikely that worker_thread() will notice kthread_should_stop() before flushing cwq->worklist. It is only possible if worker_thread() was preempted after

[PATCH 1/1] workqueue: don't migrate pending works from the dead CPU

2007-02-04 Thread Oleg Nesterov
Currently CPU_DEAD uses kthread_stop() to stop cwq-thread and then transfers cwq-worklist to another CPU. However, it is very unlikely that worker_thread() will notice kthread_should_stop() before flushing cwq-worklist. It is only possible if worker_thread() was preempted after run_workqueue(cwq),