sched/core: Use SCHED_RR in place of SCHED_FIFO for all users
Although SCHED_FIFO is a real-time scheduling policy, it can have bad results on system latency, since each SCHED_FIFO task will run to completion before yielding to another task. This can result in visible micro-stalls when a SCHED_FIFO task hogs the CPU for too long. On a system where latency is favored over throughput, using SCHED_RR is a better choice than SCHED_FIFO. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: Oktapra Amtono <oktapra.amtono@gmail.com> Signed-off-by: CloudedQuartz <ravenklawasd@gmail.com>
This commit is contained in:
parent
cda8f45b3b
commit
74cbd01416
1 changed files with 2 additions and 1 deletions
|
@ -5442,7 +5442,8 @@ static void __setscheduler_params(struct task_struct *p,
|
||||||
if (policy == SETPARAM_POLICY)
|
if (policy == SETPARAM_POLICY)
|
||||||
policy = p->policy;
|
policy = p->policy;
|
||||||
|
|
||||||
p->policy = policy;
|
/* Replace SCHED_FIFO with SCHED_RR to reduce latency */
|
||||||
|
p->policy = policy == SCHED_FIFO ? SCHED_RR : policy;
|
||||||
|
|
||||||
if (dl_policy(policy))
|
if (dl_policy(policy))
|
||||||
__setparam_dl(p, attr);
|
__setparam_dl(p, attr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue