Revert "ANDROID: cgroup/cpuset: rely on active_mask for guaranteed online CPU"

This reverts commit bca99ddbf0.

CPU Pause causes major merge conflicts with the 5.11 scheduler changes
(migrate-disable specifically), so lets revert Pause temporarily as it
is not needed urgently in android-mainline.

Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I54df88781798cab73813a4a9c4e5aad3b7f506f8
This commit is contained in:
Quentin Perret
2020-12-15 17:55:41 +00:00
parent 6078e88d1a
commit 9756c8115d
+4 -4
View File
@@ -369,13 +369,13 @@ static inline bool is_in_v2_mode(void)
* until we find one that does have some online cpus.
*
* One way or another, we guarantee to return some non-empty subset
* of cpu_active_mask.
* of cpu_online_mask.
*
* Call with callback_lock or cpuset_mutex held.
*/
static void guarantee_online_cpus(struct cpuset *cs, struct cpumask *pmask)
{
while (!cpumask_intersects(cs->effective_cpus, cpu_active_mask)) {
while (!cpumask_intersects(cs->effective_cpus, cpu_online_mask)) {
cs = parent_cs(cs);
if (unlikely(!cs)) {
/*
@@ -385,11 +385,11 @@ static void guarantee_online_cpus(struct cpuset *cs, struct cpumask *pmask)
* cpuset's effective_cpus is on its way to be
* identical to cpu_online_mask.
*/
cpumask_copy(pmask, cpu_active_mask);
cpumask_copy(pmask, cpu_online_mask);
return;
}
}
cpumask_and(pmask, cs->effective_cpus, cpu_active_mask);
cpumask_and(pmask, cs->effective_cpus, cpu_online_mask);
}
/*