[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z4GT3Q4U_E8bQHrl@gpd3>
Date: Fri, 10 Jan 2025 22:40:45 +0100
From: Andrea Righi <arighi@...dia.com>
To: Tejun Heo <tj@...nel.org>
Cc: David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7] sched_ext: idle: Refresh idle masks during
idle-to-idle transitions
On Fri, Jan 10, 2025 at 11:37:07AM -1000, Tejun Heo wrote:
> Hello,
>
> On Fri, Jan 10, 2025 at 10:23:21PM +0100, Andrea Righi wrote:
> ...
> > + /*
> > + * Update the idle masks:
> > + * - for real idle transitions (do_notify == true)
> > + * - for idle-to-idle transitions (indicated by the previous task
> > + * being the idle thread, managed by pick_task_idle())
> > + *
> > + * Skip updating idle masks if the previous task is not the idle
> > + * thread, since set_next_task_idle() has already handled it when
> > + * transitioning from a task to the idle thread (calling this
> > + * function with do_notify == true).
> > + *
> > + * In this way we can avoid updating the idle masks twice,
> > + * unnecessarily.
> > + */
> > + if (do_notify || is_idle_task(rq->curr))
> > + update_idle_masks(cpu, idle);
>
> Sorry about the multiple nitpicks but wouldn't it be better to have the
> static_key test before dynamic tests? I'd move scx_builtin_idle_enabled test
> out of update_idle_masks() and put that in front of other tests here. Also,
> maybe name the function update_builtin_idle() to stay consistent with the
> static_key name? Otherwise looks good to me.
No problem, all makes sense to me. I'll apply these changes and send a v8.
Thanks for the review!
-Andrea
Powered by blists - more mailing lists