mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
ANDROID: cpu: Don't prevent hotplug from DL/BATCH/IDLE
Commitc6e5f9d7cf("ANDROID: cpu-hotplug: Always use real time scheduling when hotplugging a CPU") tried to speed-up hotplug of SCHED_NORMAL tasks by temporarily elevating them to SCHED_FIFO. But while at it, it also prevented hotplug from SCHED_IDLE, SCHED_BATCH or SCHED_DEADLINE for no apparent reason. Since this is a userspace-visible change, and is unlikely to actually be needed, change the patch logic to only optimize for SCHED_NORMAL tasks and leave the others untouched. Bug: 169238689 Fixes:c6e5f9d7cf("ANDROID: cpu-hotplug: Always use real time scheduling when hotplugging a CPU") Signed-off-by: Quentin Perret <qperret@google.com> Change-Id: I4d9e88b15fee56e7d234826e2eaea306a69328bb
This commit is contained in:
parent
d8d3d3b4db
commit
9da1f37103
|
|
@ -1195,10 +1195,8 @@ static int switch_to_rt_policy(void)
|
|||
if (policy == SCHED_NORMAL)
|
||||
/* Switch to SCHED_FIFO from SCHED_NORMAL. */
|
||||
return sched_setscheduler_nocheck(current, SCHED_FIFO, ¶m);
|
||||
else if (policy == SCHED_FIFO || policy == SCHED_RR)
|
||||
return 1;
|
||||
else
|
||||
return -EPERM;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int switch_to_fair_policy(void)
|
||||
|
|
@ -1293,8 +1291,6 @@ static int cpu_up(unsigned int cpu, enum cpuhp_state target)
|
|||
*/
|
||||
|
||||
switch_err = switch_to_rt_policy();
|
||||
if (switch_err < 0)
|
||||
return switch_err;
|
||||
|
||||
err = try_online_node(cpu_to_node(cpu));
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user