Re: [PATCH] destroy_workqueue() can livelock

2007-07-13 Thread Michal Schmidt
Oleg Nesterov wrote: > Pointed out by Michal Schmidt <[EMAIL PROTECTED]>. > > The bug was introduced in 2.6.22 by me. > > cleanup_workqueue_thread() does flush_cpu_workqueue(cwq) in a loop until > ->worklist becomes empty. This is live-lockable, a re-niced caller can > get CPU after wake_up() and

[PATCH] destroy_workqueue() can livelock

2007-07-13 Thread Oleg Nesterov
Pointed out by Michal Schmidt <[EMAIL PROTECTED]>. The bug was introduced in 2.6.22 by me. cleanup_workqueue_thread() does flush_cpu_workqueue(cwq) in a loop until ->worklist becomes empty. This is live-lockable, a re-niced caller can get CPU after wake_up() and insert a new barrier before the lo