Re: [PATCH 14/16] freezer: make freezing() test freeze conditionsin effect instead of TIF_FREEZE
From: Oleg Nesterov
Date: Mon Aug 29 2011 - 12:21:29 EST
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/