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
I'm afraid I wasn't clear....
On 08/29, Oleg Nesterov wrote:
>
> On 08/19, Tejun Heo wrote:
> >
> > @@ -311,9 +315,11 @@ static int freezer_change_state(struct cgroup *cgroup,
> >
> > switch (goal_state) {
> > case CGROUP_THAWED:
> > + atomic_dec(&system_freezing_cnt);
> > unfreeze_cgroup(cgroup, freezer);
> > break;
> > case CGROUP_FROZEN:
> > + atomic_inc(&system_freezing_cnt);
>
> This is harmless, but afaics is not exactly right. CGROUP_FROZEN doesn't
> need system_freezing_cnt != 0, everything is already frozen and we just
> provoke freezing_slow_path() without any reason. Right?

Of course, this atomic_inc() is right, we are going to call
try_to_freeze_cgroup(). But probably it makes sense to do atomic_dec()
when freezer->state becomes CGROUP_FROZEN.

Oleg.



\
 
 \ /
  Last update: 2011-08-29 18:03    [from the cache]
©2003-2011 Jasper Spaans