Re: [PATCH v7 20/23] sched: Push execution and scheduler context split into deadline and rt paths

John Stultz
2024-01-05T00:02:10Z

On Fri, Dec 22, 2023 at 3:33 AM Metin Kaya <metin.kaya@arm.com> wrote:
>
> On 20/12/2023 12:18 am, John Stultz wrote:
> > From: Connor O'Brien <connoro@google.com>
> >
> > In preparation for chain migration, push the awareness
> > of the split between execution and scheduler context
> > down into some of the rt/deadline code paths that deal
> > with load balancing.
> >
> > This patch was broken out from a larger chain migration
> > patch originally by Connor O'Brien.
> >
>
> Nit: Commit header is too long. ` paths` can be dropped.

Done.

> > @@ -2079,25 +2079,25 @@ static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu
> >
> > static DEFINE_PER_CPU(cpumask_var_t, local_cpu_mask_dl);
> >
> > -static int find_later_rq(struct task_struct *task)
> > +static int find_later_rq(struct task_struct *sched_ctx, struct task_struct *exec_ctx)
>
> Nit: line becomes too long. Same for find_later_rq()'s signature above
> as well as find_lowest_rq() in rt.c.

While I do try to keep things under 80 where I can, it's no longer the standard:
https://lore.kernel.org/lkml/20120203100743.GA3334@elte.hu/

> >
> > - if (task->nr_cpus_allowed == 1)
> > + if (exec_ctx && exec_ctx->nr_cpus_allowed == 1)
>
> Can exec_ctx be NULL? If so, we may hit a seg. fault at
> task_rq(exec_ctx) below.

Oh, this is a bad split on my part. Only after find_exec_ctx() is
introduced can the exec_ctx be null.
I'll move that change to later in the series.

thanks
-john