Commit 4705be3f authored by Juri Lelli's avatar Juri Lelli Committed by sanglipeng
Browse files

cgroup/cpuset: Iterate only if DEADLINE tasks are present

stable inclusion
from stable-v5.10.193
commit c9546921a4b97813254c74ba3d1870f53f02e2ad
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9399M

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c9546921a4b97813254c74ba3d1870f53f02e2ad



--------------------------------

commit c0f78fd5 upstream.

update_tasks_root_domain currently iterates over all tasks even if no
DEADLINE task is present on the cpuset/root domain for which bandwidth
accounting is being rebuilt. This has been reported to introduce 10+ ms
delays on suspend-resume operations.

Skip the costly iteration for cpusets that don't contain DEADLINE tasks.

Reported-by: default avatarQais Yousef (Google) <qyousef@layalina.io>
Link: https://lore.kernel.org/lkml/20230206221428.2125324-1-qyousef@layalina.io/


Signed-off-by: default avatarJuri Lelli <juri.lelli@redhat.com>
Reviewed-by: default avatarWaiman Long <longman@redhat.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarQais Yousef (Google) <qyousef@layalina.io>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent b266165b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment