Re: [ 01/23] [Suspend2] Make workqueues freezeable.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rafael.

On Friday 27 January 2006 09:17, Rafael J. Wysocki wrote:
> Hi,
>
> On Thursday, 26 January 2006 04:45, Nigel Cunningham wrote:
> > Prior to this patch, kernel threads and workqueues are unconditionally
> > unfreezeable. This patch reverses that behaviour, making the default
> > for kernel processes to be frozen. New variations of the routines for
> > starting kernel threads and workqueues (containing _nofreeze_) allow
> > threads that need to run during suspend to be made nofreeze again.
>
> This looks like "let's make everything freezable and hunt for things that
> must not be frozen" kind of approach, but isn't it error-prone?  I mean,
> for example, if someone creates a kernel thread that in fact must not
> be frozen, but forgets to use the _nofreeze_ call, things will break for
> some people and the problem will be worse than the current one,
> it seems.

You're right that the default is now to freeze threads. This is mostly because 
the majority of kernel threads can and should be frozen because they're not 
needed. If a thread is frozen which shouldn't be, the user (which will 
hopefully be the developer testing their work) will experience a deadlock 
when they try to suspend. If, on the other hand, we let threads run that 
should be frozen, well - the outcome depends on what is done when the thread 
should be frozen. Obviously it doesn't hurt too much to let kernel threads 
run, or we'd see problems at the moment. For this reason, I consider this 
patch more to be a nicety than a necessity. Nice because it makes kernel 
threads behave in a manner consistent with what happens to userspace (hence 
defaulting to freezing, rather than not).

Regards,

Nigel
-- 
See our web page for Howtos, FAQs, the Wiki and mailing list info.
http://www.suspend2.net                IRC: #suspend2 on Freenode
-
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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux