[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aRJgTTiAnHzrMN8y@slm.duckdns.org>
Date: Mon, 10 Nov 2025 11:59:41 -1000
From: Tejun Heo <tj@...nel.org>
To: Emil Tsalapatis <linux-lists@...alapatis.com>
Cc: David Vernet <void@...ifault.com>,
Andrea Righi <andrea.righi@...ux.dev>,
Changwoo Min <changwoo@...lia.com>,
Dan Schatzberg <schatzberg.dan@...il.com>,
Emil Tsalapatis <etsal@...a.com>, sched-ext@...ts.linux.dev,
linux-kernel@...r.kernel.org, Andrea Righi <arighi@...dia.com>
Subject: Re: [PATCH v2 04/14] sched_ext: Use per-CPU DSQs instead of per-node
global DSQs in bypass mode
Hello, Emil.
On Mon, Nov 10, 2025 at 04:43:23PM -0500, Emil Tsalapatis wrote:
> > @@ -1298,7 +1298,7 @@ static void do_enqueue_task(struct rq *rq, struct task_struct *p, u64 enq_flags,
> >
> > if (scx_rq_bypassing(rq)) {
> > __scx_add_event(sch, SCX_EV_BYPASS_DISPATCH, 1);
>
> Nit: The bypass label has a single statement, and there is no fallthrough to it.
> Can we just add the logic here:
>
> dsq = &task_rq(p)->scx.bypass_dsq;
> goto enqueue;
>
> and remove the new label?
>
> > - goto global;
> > + goto bypass;
> > }
> >
> > if (p->scx.ddsp_dsq_id != SCX_DSQ_INVALID)
> > @@ -1356,6 +1356,9 @@ static void do_enqueue_task(struct rq *rq, struct task_struct *p, u64 enq_flags,
> > global:
> > dsq = find_global_dsq(sch, p);
> > goto enqueue;
> > +bypass:
> > + dsq = &task_rq(p)->scx.bypass_dsq;
>
> Nit: If we keep the bypass label, we can remove the goto since the
> label is right below. Otherwise, we could remove it
This is really subjective but I like the fact that the local, global and
bypass labels look symmetric. It doesn't make any different to compilers and
I think keeping them so is less likely to trip up people.
Thanks.
--
tejun
Powered by blists - more mailing lists