Re: [PATCH 6/9] cgroup_freezer: make freezer->state mask of flags

2012-11-08 Thread Michal Hocko
On Thu 08-11-12 06:39:52, Tejun Heo wrote: > Hello, Michal. > > On Thu, Nov 08, 2012 at 11:39:28AM +0100, Michal Hocko wrote: > > On Sat 03-11-12 01:38:32, Tejun Heo wrote: > > > freezer->state was an enum value - one of THAWED, FREEZING and FROZEN. > > > As the scheduled full hierarchy support re

Re: [PATCH 6/9] cgroup_freezer: make freezer->state mask of flags

2012-11-08 Thread Tejun Heo
Hello, Michal. On Thu, Nov 08, 2012 at 11:39:28AM +0100, Michal Hocko wrote: > On Sat 03-11-12 01:38:32, Tejun Heo wrote: > > freezer->state was an enum value - one of THAWED, FREEZING and FROZEN. > > As the scheduled full hierarchy support requires more than one > > freezing condition, switch it

Re: [PATCH 6/9] cgroup_freezer: make freezer->state mask of flags

2012-11-08 Thread Tejun Heo
Hello, Kamezawa. On Thu, Nov 08, 2012 at 02:00:34PM +0900, Kamezawa Hiroyuki wrote: > (2012/11/08 13:42), Tejun Heo wrote: > >Hello, Kame. > > > >On Thu, Nov 08, 2012 at 01:37:50PM +0900, Kamezawa Hiroyuki wrote: > >>How about > >>enum { > >>__CGROUP_FREEZING, > >>__CGROUP_FROZEN, > >>}; >

Re: [PATCH 6/9] cgroup_freezer: make freezer->state mask of flags

2012-11-08 Thread Michal Hocko
On Sat 03-11-12 01:38:32, Tejun Heo wrote: > freezer->state was an enum value - one of THAWED, FREEZING and FROZEN. > As the scheduled full hierarchy support requires more than one > freezing condition, switch it to mask of flags. If FREEZING is not > set, it's thawed. FREEZING is set if freezing

Re: [PATCH 6/9] cgroup_freezer: make freezer->state mask of flags

2012-11-07 Thread Kamezawa Hiroyuki
(2012/11/08 13:42), Tejun Heo wrote: Hello, Kame. On Thu, Nov 08, 2012 at 01:37:50PM +0900, Kamezawa Hiroyuki wrote: How about enum { __CGROUP_FREEZING, __CGROUP_FROZEN, }; #define CGROUP_FREEZER_STATE_MASK 0x3 #define CGROUP_FREEZER_STATE(state) ((state) & CGROUP_FREEZER_STATE_MA

Re: [PATCH 6/9] cgroup_freezer: make freezer->state mask of flags

2012-11-07 Thread Tejun Heo
Hello, Kame. On Thu, Nov 08, 2012 at 01:37:50PM +0900, Kamezawa Hiroyuki wrote: > How about > enum { >__CGROUP_FREEZING, >__CGROUP_FROZEN, > }; > > #define CGROUP_FREEZER_STATE_MASK 0x3 > #define CGROUP_FREEZER_STATE(state) ((state) & CGROUP_FREEZER_STATE_MASK) > #define CGROUP_THAW(st

Re: [PATCH 6/9] cgroup_freezer: make freezer->state mask of flags

2012-11-07 Thread Kamezawa Hiroyuki
(2012/11/03 17:38), Tejun Heo wrote: freezer->state was an enum value - one of THAWED, FREEZING and FROZEN. As the scheduled full hierarchy support requires more than one freezing condition, switch it to mask of flags. If FREEZING is not set, it's thawed. FREEZING is set if freezing or frozen.

[PATCH 6/9] cgroup_freezer: make freezer->state mask of flags

2012-11-03 Thread Tejun Heo
freezer->state was an enum value - one of THAWED, FREEZING and FROZEN. As the scheduled full hierarchy support requires more than one freezing condition, switch it to mask of flags. If FREEZING is not set, it's thawed. FREEZING is set if freezing or frozen. If frozen, both FREEZING and FROZEN ar