From: Johannes Weiner <hannes@cmpxchg.org>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: peterz@infradead.org, akpm@linux-foundation.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Daniel Drake <drake@endlessm.com>,
Suren Baghdasaryan <surenb@google.com>
Subject: Re: [PATCH] psi: fix randomized calculation in record_times()
Date: Fri, 3 Apr 2020 11:20:16 -0400 [thread overview]
Message-ID: <20200403152016.GA69203@cmpxchg.org> (raw)
In-Reply-To: <1585904125-2819-1-git-send-email-laoar.shao@gmail.com>
On Fri, Apr 03, 2020 at 04:55:25AM -0400, Yafang Shao wrote:
> @@ -690,7 +690,10 @@ static void psi_group_change(struct psi_group *group, int cpu,
> */
> write_seqcount_begin(&groupc->seq);
>
> - record_times(groupc, cpu, false);
> + if (groupc->total_tasks)
> + record_times(groupc, cpu, false);
> + else
> + groupc->state_start = cpu_clock(cpu);
This change appears is a no-op. If there are no tasks,
groupc->state_mask is 0, and the only thing record_times() does is
groupc->state_start = cpu_clock(cpu);
Did you encounter actual problems, or are you just reading the code?
next prev parent reply other threads:[~2020-04-03 15:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 8:55 [PATCH] psi: fix randomized calculation in record_times() Yafang Shao
2020-04-03 15:20 ` Johannes Weiner [this message]
2020-04-04 2:31 ` Yafang Shao
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=20200403152016.GA69203@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=drake@endlessm.com \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterz@infradead.org \
--cc=surenb@google.com \
/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;
as well as URLs for NNTP newsgroup(s).