[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtB8NiKqggZN3v6u=Rdwj4grzRwn1mW31ov0y5ZhDBcvuw@mail.gmail.com>
Date: Wed, 22 Apr 2020 15:21:45 +0200
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...nel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
Qais Yousef <qais.yousef@....com>,
Juri Lelli <juri.lelli@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
John Stultz <john.stultz@...aro.org>
Subject: Re: [PATCH 13/23] sched,ion: Convert to sched_set_normal()
On Wed, 22 Apr 2020 at 13:29, Peter Zijlstra <peterz@...radead.org> wrote:
>
> In an attempt to take away sched_setscheduler() from modules, change
> this into sched_set_normal(.nice = 19).
>
> Cc: john.stultz@...aro.org
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Reviewed-by: Ingo Molnar <mingo@...nel.org>
> ---
> drivers/staging/android/ion/ion_heap.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> --- a/drivers/staging/android/ion/ion_heap.c
> +++ b/drivers/staging/android/ion/ion_heap.c
> @@ -244,8 +244,6 @@ static int ion_heap_deferred_free(void *
>
> int ion_heap_init_deferred_free(struct ion_heap *heap)
> {
> - struct sched_param param = { .sched_priority = 0 };
> -
> INIT_LIST_HEAD(&heap->free_list);
> init_waitqueue_head(&heap->waitqueue);
> heap->task = kthread_run(ion_heap_deferred_free, heap,
> @@ -255,7 +253,7 @@ int ion_heap_init_deferred_free(struct i
> __func__);
> return PTR_ERR_OR_ZERO(heap->task);
> }
> - sched_setscheduler(heap->task, SCHED_IDLE, ¶m);
> + sched_set_normal(heap->task, 19);
Would it make sense to have a sched_set_idle(task) to enable kernel
setting SCHED_IDLE task ?
SCHED_NORMAL w/ nice 19 and SCHED_IDLE tasks are not treated in the
same way when checking for preemption at wakeup
>
> return 0;
> }
>
>
Powered by blists - more mailing lists