2020-04-22 11:32:19

by Peter Zijlstra

[permalink] [raw]
Subject: [PATCH 21/23] sched,psi: Convert to sched_set_fifo_low()

Because SCHED_FIFO is a broken scheduler model (see previous patches)
take away the priority field, the kernel can't possibly make an
informed decision.

Effectively no change.

Cc: [email protected]
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Ingo Molnar <[email protected]>
---
kernel/sched/psi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

--- a/kernel/sched/psi.c
+++ b/kernel/sched/psi.c
@@ -1100,9 +1100,6 @@ struct psi_trigger *psi_trigger_create(s
mutex_lock(&group->trigger_lock);

if (!rcu_access_pointer(group->poll_kworker)) {
- struct sched_param param = {
- .sched_priority = 1,
- };
struct kthread_worker *kworker;

kworker = kthread_create_worker(0, "psimon");
@@ -1111,7 +1108,7 @@ struct psi_trigger *psi_trigger_create(s
mutex_unlock(&group->trigger_lock);
return ERR_CAST(kworker);
}
- sched_setscheduler_nocheck(kworker->task, SCHED_FIFO, &param);
+ sched_set_fifo_low(kworker->task);
kthread_init_delayed_work(&group->poll_work,
psi_poll_work);
rcu_assign_pointer(group->poll_kworker, kworker);



2020-04-22 15:25:36

by Johannes Weiner

[permalink] [raw]
Subject: Re: [PATCH 21/23] sched,psi: Convert to sched_set_fifo_low()

On Wed, Apr 22, 2020 at 01:27:40PM +0200, Peter Zijlstra wrote:
> Because SCHED_FIFO is a broken scheduler model (see previous patches)
> take away the priority field, the kernel can't possibly make an
> informed decision.
>
> Effectively no change.
>
> Cc: [email protected]
> Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
> Reviewed-by: Ingo Molnar <[email protected]>

Acked-by: Johannes Weiner <[email protected]>