[Devel] Re: [PATCH 2/4] cgroup freezer: Avoid lazy state changes when convenient

Serge E. Hallyn serue at us.ibm.com
Wed Jun 3 09:10:46 PDT 2009


Quoting Matt Helsley (matthltc at us.ibm.com):
>  When all the tasks of a cgroup were successfully frozen we can avoid
>  the lazy FREEZING -> FROZEN transition and move into FROZEN during the
>  write to freezer.state.

Can you remind us then what the point of the FREEZING state is?
It doesn't look to me like, after this patch, a cgroup will
ever be FREEZING?

> Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
> ---
>  kernel/cgroup_freezer.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c
> index 765e2c1..19702ac 100644
> --- a/kernel/cgroup_freezer.c
> +++ b/kernel/cgroup_freezer.c
> @@ -286,7 +286,10 @@ static int try_to_freeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
>  	}
>  	cgroup_iter_end(cgroup, &it);
> 
> -	return num_cant_freeze_now ? -EBUSY : 0;
> +	if (num_cant_freeze_now)
> +		return -EBUSY;
> +	freezer->state = CGROUP_FROZEN;
> +	return 0;
>  }
> 
>  static void unfreeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
> -- 
> 1.5.6.3
> 
> 
> _______________________________________________
> Containers mailing list
> Containers at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list