]> git.baikalelectronics.ru Git - kernel.git/commit
sched/deadline: Merge dl_task_can_attach() and dl_cpu_busy()
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Wed, 2 Mar 2022 18:34:30 +0000 (19:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:14 +0000 (14:24 +0200)
commit07a1cde90ec37505c3d0d638d33889f4db83a026
treee43ca7e41acedae1006d99e7e2fe0f66467d2307
parent9848059e15277ae0c1b82f077b5175bfdbd8222a
sched/deadline: Merge dl_task_can_attach() and dl_cpu_busy()

[ Upstream commit 8f5a69084547270ef93cf8d544221e0e10036d74 ]

Both functions are doing almost the same, that is checking if admission
control is still respected.

With exclusive cpusets, dl_task_can_attach() checks if the destination
cpuset (i.e. its root domain) has enough CPU capacity to accommodate the
task.
dl_cpu_busy() checks if there is enough CPU capacity in the cpuset in
case the CPU is hot-plugged out.

dl_task_can_attach() is used to check if a task can be admitted while
dl_cpu_busy() is used to check if a CPU can be hotplugged out.

Make dl_cpu_busy() able to deal with a task and use it instead of
dl_task_can_attach() in task_can_attach().

Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Juri Lelli <juri.lelli@redhat.com>
Link: https://lore.kernel.org/r/20220302183433.333029-4-dietmar.eggemann@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/sched/core.c
kernel/sched/deadline.c
kernel/sched/sched.h