2020-04-22 12:24:59

by Peter Zijlstra

[permalink] [raw]
Subject: [PATCH 02/23] sched,bL_switcher: Convert to sched_set_fifo*()

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.

In this case, use fifo_low, because it only cares about being above
SCHED_NORMAL. Effectively no change in behaviour.

Cc: [email protected]
Cc: [email protected]
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Ingo Molnar <[email protected]>
---
arch/arm/common/bL_switcher.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/arch/arm/common/bL_switcher.c
+++ b/arch/arm/common/bL_switcher.c
@@ -270,12 +270,11 @@ static struct bL_thread bL_threads[NR_CP
static int bL_switcher_thread(void *arg)
{
struct bL_thread *t = arg;
- struct sched_param param = { .sched_priority = 1 };
int cluster;
bL_switch_completion_handler completer;
void *completer_cookie;

- sched_setscheduler_nocheck(current, SCHED_FIFO, &param);
+ sched_set_fifo_low(current);
complete(&t->started);

do {



2020-04-22 13:29:47

by Nicolas Pitre

[permalink] [raw]
Subject: Re: [PATCH 02/23] sched,bL_switcher: Convert to sched_set_fifo*()

On Wed, 22 Apr 2020, 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.
>
> In this case, use fifo_low, because it only cares about being above
> SCHED_NORMAL. Effectively no change in behaviour.
>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
> Reviewed-by: Ingo Molnar <[email protected]>

Acked-by: Nicolas Pitre <[email protected]>

> ---
> arch/arm/common/bL_switcher.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- a/arch/arm/common/bL_switcher.c
> +++ b/arch/arm/common/bL_switcher.c
> @@ -270,12 +270,11 @@ static struct bL_thread bL_threads[NR_CP
> static int bL_switcher_thread(void *arg)
> {
> struct bL_thread *t = arg;
> - struct sched_param param = { .sched_priority = 1 };
> int cluster;
> bL_switch_completion_handler completer;
> void *completer_cookie;
>
> - sched_setscheduler_nocheck(current, SCHED_FIFO, &param);
> + sched_set_fifo_low(current);
> complete(&t->started);
>
> do {
>
>
>