On Wed, Feb 28, 2007 at 12:57:35AM +0100, Rafael J. Wysocki wrote:
> > How about other kthread_stop()s ? For example, 
> > kernel/softirq.c:cpu_callback() ?
> 
> They all are PF_NOFREEZE, I suppose.  If we make all workqueues nonfreezable
> (as they were before), the problem won't appear.

We can just thaw the worker thread selectively before kthread_stopping
them. This will let us freeze all worker threads (which we want to for
hotplug anyway).

> > I think we need a general "cpu_down() after freeze" implementation, this is 
> > what
> > Gautham and Srivatsa are working on, right?
> 
> Yes, certainly.

Hmm ..good point. So can we assume that disable/enable_nonboot_cpus() are called
with processes frozen already?

Gautham, you need to take this into account in your patchset!

> > I'm afraid this is racy. We can't touch *cwq, it may be freed. Suppose
> > that another thread does destroy_workqueue(), and we thaw that thread
> > before cwq->thread.
> 
> Okay, in that case I'd suggest removing create_freezeable_workqueue() and
> make all workqueues nonfreezable once again for 2.6.21 (as far as I know, only
> the two XFS workqueues are affected).

See above suggestion of thawing worker thread before kthread_stopping
it.

-- 
Regards,
vatsa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to