lkml.org 
[lkml]   [2011]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/16] freezer: make freezing() test freeze conditions in effect instead of TIF_FREEZE
On 08/29, Oleg Nesterov wrote:
>
> > @@ -120,13 +120,18 @@ int freeze_processes(void)
> > {
> > int error;
> >
> > + if (!pm_freezing)
> > + atomic_inc(&system_freezing_cnt);
> > +
> > printk("Freezing user space processes ... ");
> > + pm_freezing = true;
>
> and
>
> > @@ -146,6 +151,11 @@ void thaw_processes(void)
> > {
> > struct task_struct *g, *p;
> >
> > + if (pm_freezing)
> > + atomic_dec(&system_freezing_cnt);
> > + pm_freezing = false;
>
> I simply can't understand this... Why freeze_processes/thaw_processes
> check pm_freezing?

Ah, wait, I seem to understand.

> IIUC, the calls to freeze/thaw should be serialized anyway

Yes, and that is why this should actually work, I think.

Sorry for noise...

Oleg.



\
 
 \ /
  Last update: 2011-08-29 18:23    [W:0.225 / U:1.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site