[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251016074915.GA3289052@noisy.programming.kicks-ass.net>
Date: Thu, 16 Oct 2025 09:49:15 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Tim Chen <tim.c.chen@...ux.intel.com>
Cc: Ingo Molnar <mingo@...hat.com>,
K Prateek Nayak <kprateek.nayak@....com>,
"Gautham R . Shenoy" <gautham.shenoy@....com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Juri Lelli <juri.lelli@...hat.com>,
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>,
Madadi Vineeth Reddy <vineethr@...ux.ibm.com>,
Hillf Danton <hdanton@...a.com>,
Shrikanth Hegde <sshegde@...ux.ibm.com>,
Jianyong Wu <jianyong.wu@...look.com>,
Yangyu Chen <cyy@...self.name>,
Tingyin Duan <tingyin.duan@...il.com>,
Vern Hao <vernhao@...cent.com>, Len Brown <len.brown@...el.com>,
Aubrey Li <aubrey.li@...el.com>, Zhao Liu <zhao1.liu@...el.com>,
Chen Yu <yu.chen.surf@...il.com>, Chen Yu <yu.c.chen@...el.com>,
Libo Chen <libo.chen@...cle.com>,
Adam Li <adamli@...amperecomputing.com>,
Tim Chen <tim.c.chen@...el.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 08/19] sched/fair: Introduce per runqueue task LLC
preference counter
On Wed, Oct 15, 2025 at 01:41:42PM -0700, Tim Chen wrote:
> > > + /* avoid negative counter */
> > > + if (rq->nr_pref_llc[pref_llc] > 0)
> > > + --rq->nr_pref_llc[pref_llc];
> >
> > How!? Also, please use post increment/decrement operators.
>
> Will change the rq->nr_pref_llc[pref_llc] <= 0 to a warning instead,
> and update the decrement to post operator.
That WARN will still add code. Note how none of the nr_*_running
decrements have checks on. You fundamentally cannot remove a task from
the runqueue that hasn't first been enqueued.
If you get mis-matches something is *very* busted.
Powered by blists - more mailing lists