On Tue, Dec 17, 2024 at 12:48:18AM +0000, Chen Ridong wrote: > From: Chen Ridong <chenridong@xxxxxxxxxx> > > Before the commit f5d39b020809 ("freezer,sched: Rewrite core freezer > logic"), the frozen task stat was reported as 'D' in cgroup v1. > However, after rewriting core freezer logic, the frozen task stat is > reported as 'R'. This is confusing, especially when a task with stat of > 'S' is frozen. > > This can be reproduced as bellow step: > cd /sys/fs/cgroup/freezer/ > mkdir test > sleep 1000 & > [1] 739 // task whose stat is 'S' > echo 739 > test/cgroup.procs > echo FROZEN > test/freezer.state > ps -aux | grep 739 > root 739 0.1 0.0 8376 1812 pts/0 R 10:56 0:00 sleep 1000 > > As shown above, a task whose stat is 'S' was changed to 'R' when it was > frozen. To solve this issue, simply maintain the same reported state as > before the rewrite. > > Fixes: f5d39b020809 ("freezer,sched: Rewrite core freezer logic") > Signed-off-by: Chen Ridong <chenridong@xxxxxxxxxx> > Acked-by: Tejun Heo <tj@xxxxxxxxxx> Thanks!