From: Peter Zijlstra <peterz@infradead.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Charan Teja Reddy <charante@codeaurora.org>,
mingo@redhat.com, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] sched,psi: fix the 'int' underflow for psi
Date: Fri, 16 Apr 2021 19:22:49 +0200 [thread overview]
Message-ID: <YHnH6R2c7VW05jc0@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <YHmpCOz339T67yTt@cmpxchg.org>
On Fri, Apr 16, 2021 at 11:11:04AM -0400, Johannes Weiner wrote:
> 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@codeaurora.org>
>
> The subject should be
>
> psi: handle potential task count underflow bugs more gracefully
Done.
> since it's not fixing a known bug at this point. Otherwise,
>
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Thanks!
next prev parent reply other threads:[~2021-04-16 17:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 15:02 Charan Teja Reddy
2021-04-16 15:11 ` Johannes Weiner
2021-04-16 17:22 ` Peter Zijlstra [this message]
2021-04-22 7:36 ` [tip: sched/core] sched,psi: Handle potential task count underflow bugs more gracefully tip-bot2 for Charan Teja Reddy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YHnH6R2c7VW05jc0@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=charante@codeaurora.org \
--cc=dietmar.eggemann@arm.com \
--cc=hannes@cmpxchg.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®