[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YHmpCOz339T67yTt@cmpxchg.org>
Date: Fri, 16 Apr 2021 11:11:04 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Charan Teja Reddy <charante@...eaurora.org>
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] sched,psi: fix the 'int' underflow for psi
On Fri, Apr 16, 2021 at 08:32:16PM +0530, Charan Teja Reddy wrote:
> psi_group_cpu->tasks, represented by the unsigned int, stores the number
> of tasks that could be stalled on a psi resource(io/mem/cpu).
> Decrementing these counters at zero leads to wrapping which further
> leads to the psi_group_cpu->state_mask is being set with the respective
> pressure state. This could result into the unnecessary time sampling for
> the pressure state thus cause the spurious psi events. This can further
> lead to wrong actions being taken at the user land based on these psi
> events.
> Though psi_bug is set under these conditions but that just for debug
> purpose. Fix it by decrementing the ->tasks count only when it is
> non-zero.
>
> Signed-off-by: Charan Teja Reddy <charante@...eaurora.org>
The subject should be
psi: handle potential task count underflow bugs more gracefully
since it's not fixing a known bug at this point. Otherwise,
Acked-by: Johannes Weiner <hannes@...xchg.org>
Powered by blists - more mailing lists