Lines Matching full:frozen
15 static bool cgroup_update_frozen_flag(struct cgroup *cgrp, bool frozen) in cgroup_update_frozen_flag() argument
20 if (test_bit(CGRP_FROZEN, &cgrp->flags) == frozen) in cgroup_update_frozen_flag()
23 if (frozen) in cgroup_update_frozen_flag()
29 TRACE_CGROUP_PATH(notify_frozen, cgrp, frozen); in cgroup_update_frozen_flag()
34 * Propagate the cgroup frozen state upwards by the cgroup tree.
36 static void cgroup_propagate_frozen(struct cgroup *cgrp, bool frozen) in cgroup_propagate_frozen() argument
41 * If the new state is frozen, some freezing ancestor cgroups may change in cgroup_propagate_frozen()
42 * their state too, depending on if all their descendants are frozen. in cgroup_propagate_frozen()
44 * Otherwise, all ancestor cgroups are forced into the non-frozen state. in cgroup_propagate_frozen()
47 if (frozen) { in cgroup_propagate_frozen()
57 if (cgroup_update_frozen_flag(cgrp, frozen)) in cgroup_propagate_frozen()
63 * Revisit the cgroup frozen state.
64 * Checks if the cgroup is really frozen and perform all state transitions.
68 bool frozen; in cgroup_update_frozen() local
71 * If the cgroup has to be frozen (CGRP_FREEZE bit set), in cgroup_update_frozen()
72 * and all tasks are frozen and/or stopped, let's consider in cgroup_update_frozen()
73 * the cgroup frozen. Otherwise it's not frozen. in cgroup_update_frozen()
75 frozen = test_bit(CGRP_FREEZE, &cgrp->flags) && in cgroup_update_frozen()
79 if (cgroup_update_frozen_flag(cgrp, frozen)) in cgroup_update_frozen()
80 cgroup_propagate_frozen(cgrp, frozen); in cgroup_update_frozen()
101 * Enter frozen/stopped state, if not yet there. Update cgroup's counters,
108 if (current->frozen) in cgroup_enter_frozen()
112 current->frozen = true; in cgroup_enter_frozen()
120 * Conditionally leave frozen/stopped state. Update cgroup's counters,
125 * drop the frozen counter to avoid a transient switch to
137 WARN_ON_ONCE(!current->frozen); in cgroup_leave_frozen()
138 current->frozen = false; in cgroup_leave_frozen()
225 * Kernel threads are not supposed to be frozen at all. in cgroup_freezer_migrate_task()
232 * are not freezing and task is not frozen. in cgroup_freezer_migrate_task()
236 !task->frozen) in cgroup_freezer_migrate_task()
240 * Adjust counters of freezing and frozen tasks. in cgroup_freezer_migrate_task()
241 * Note, that if the task is frozen, but the destination cgroup is not in cgroup_freezer_migrate_task()
242 * frozen, we bump both counters to keep them balanced. in cgroup_freezer_migrate_task()
244 if (task->frozen) { in cgroup_freezer_migrate_task()