Messages in this thread | | | Date | Mon, 29 Aug 2011 18:17:50 +0200 | From | Oleg Nesterov <> | Subject | Re: [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.
| |