On 04/11, Gautham R Shenoy wrote:
> On Wed, Apr 11, 2007 at 03:48:05PM +0400, Oleg Nesterov wrote:
> > On 04/11, Gautham R Shenoy wrote:
> > >
> > > On Wed, Apr 11, 2007 at 12:13:34PM +0200, Rafael J. Wysocki wrote:
> > > > 
> > > > It should be calling try_to_freeze() somewhere anyway.  We may need to 
> > > > freeze
> > > > all tasks in some cases.
> > > 
> > > How about
> > > for (;;) {
> > >   try_to_freeze();
> > > 
> > > ?
> > 
> > Why?
> 
> If some event (defintely NOT cpu hotplug) needs this thread frozen.
> 
> > 
> > > This change allows us to make all the worker threads freezeable by 
> > > default.
> > > >From cpu-hotplug perspective, helper_wq was the only singlethreaded
> > > non-freezeable workqueue.
> > 
> > I think Eric's patch is what you need. We should _not_ freeze kthreadd(), we
> > need kthread_create() after freezing. Now it doesn't depend on workqueues, 
> > we
> > can freeze them all, single-thread or not.
> > 
> 
> These were my exact thoughts. 

Sorry, I misunderstood your message.

Yes, we can freeze it with FE_HOTPLUG_CPU. In that case wait_event()
should also check !freezing(), and try_to_freeze() should be called
after case wait_event().

On the other hand, if "kthreadd" does not sleep on kthread_create_work,
we have another unfrozen process waiting for kthread_create_info.done.
So, is there any practical reason why kthreadd() should explicitely go
to refrigerator?

Oleg.

-
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