From: Peter Zijlstra <peterz@infradead.org>
To: Liu Song <fishland@aliyun.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, liu.song11@zte.com.cn
Subject: Re: [PATCH] psi: Only collect online cpu time in collect_percpu_times
Date: Wed, 4 Dec 2019 13:35:00 +0100 [thread overview]
Message-ID: <20191204123500.GT2844@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20191202130928.2971-1-fishland@aliyun.com>
On Mon, Dec 02, 2019 at 09:09:28PM +0800, Liu Song wrote:
> From: Liu Song <liu.song11@zte.com.cn>
>
> Tasks can only run on the online cpu, so only need to
> collect the time of the online cpu.
>
> Signed-off-by: Liu Song <liu.song11@zte.com.cn>
> ---
> kernel/sched/psi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
> index 7acc632c3b82..605f02facb7b 100644
> --- a/kernel/sched/psi.c
> +++ b/kernel/sched/psi.c
> @@ -316,7 +316,7 @@ static void collect_percpu_times(struct psi_group *group,
> * the sampling period. This eliminates artifacts from uneven
> * loading, or even entirely idle CPUs.
> */
> - for_each_possible_cpu(cpu) {
> + for_each_online_cpu(cpu) {
> u32 times[NR_PSI_STATES];
> u32 nonidle;
> u32 cpu_changed_states;
And who collects the deltas that remain after offline?
next parent reply other threads:[~2019-12-04 12:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191202130928.2971-1-fishland@aliyun.com>
2019-12-04 12:35 ` Peter Zijlstra [this message]
[not found] ` <201912051005599522735@zte.com.cn>
2019-12-05 10:33 ` Peter Zijlstra
[not found] ` <201912061229281310714@zte.com.cn>
2019-12-06 12:01 ` Peter Zijlstra
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=20191204123500.GT2844@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=fishland@aliyun.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liu.song11@zte.com.cn \
--cc=mingo@redhat.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
all inboxes | Powered by JetHome®