]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: freezer: don't change task and cgroups status unnecessarily
authorHonglei Wang <honglei.wang@oracle.com>
Wed, 30 Oct 2019 08:18:10 +0000 (16:18 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 7 Nov 2019 15:38:41 +0000 (07:38 -0800)
commit83fa3284d29d8c9c3f6cd19b4e1342a0d49dffc1
tree99d8abb0bd131643d1ecd1266f4865029106578f
parent9229ee60fb5fd59bb9c8d88663c6cc613ea11aca
cgroup: freezer: don't change task and cgroups status unnecessarily

It's not necessary to adjust the task state and revisit the state
of source and destination cgroups if the cgroups are not in freeze
state and the task itself is not frozen.

And in this scenario, it wakes up the task who's not supposed to be
ready to run.

Don't do the unnecessary task state adjustment can help stop waking
up the task without a reason.

Signed-off-by: Honglei Wang <honglei.wang@oracle.com>
Acked-by: Roman Gushchin <guro@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/freezer.c