From: Ingo Molnar <mingo@kernel.org>
To: Lu Jialin <lujialin4@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Valentin Schneider <vschneid@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] psi: update psi irqtime when the irq delta is nozero
Date: Thu, 28 Sep 2023 23:26:58 +0200 [thread overview]
Message-ID: <ZRXvoq6uNk4+cs7Q@gmail.com> (raw)
In-Reply-To: <20230810131514.910401-1-lujialin4@huawei.com>
* Lu Jialin <lujialin4@huawei.com> wrote:
> If update psi irqtime whether the irq delta is zero or not, the performance
> will be degradation when update_rq_clock_task works frequently.
> Therefore, just update psi irqtime whether the irq delta is nozero.
> performace test of times(libmicro):
> 1) without psi_account_irqtime in update_rq_clock_task
> [root@arm64_perf]# ./times -E -C 200 -L -S -W -N "times" -I 200
> Running: times# ./../bin-arm64/times -E -C 200 -L -S -W -N times -I 200
> prc thr usecs/call samples errors cnt/samp
> times 1 1 0.45210 188 0 500
>
> 2) psi_account_irqtime in update_rq_clock_task
> [root@arm64_perf]# ./times -E -C 200 -L -S -W -N "times" -I 200
> Running: times# ./../bin-arm64/times -E -C 200 -L -S -W -N times -I 200
> prc thr usecs/call samples errors cnt/samp
> times 1 1 0.49408 196 0 500
>
> 3) psi_account_irqtime in update_rq_clock_task when irq delta is nozero
> [root@arm64_perf]# ./times -E -C 200 -L -S -W -N "times" -I 200
> Running: times# ./../bin-arm64/times -E -C 200 -L -S -W -N times -I 200
> prc thr usecs/call samples errors cnt/samp
> times 1 1 0.45158 195 0 500
>
> Signed-off-by: Lu Jialin <lujialin4@huawei.com>
> ---
> kernel/sched/core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index c52c2eba7c73..69c4f229d6d1 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -722,7 +722,8 @@ static void update_rq_clock_task(struct rq *rq, s64 delta)
>
> rq->prev_irq_time += irq_delta;
> delta -= irq_delta;
> - psi_account_irqtime(rq->curr, irq_delta);
> + if (irq_delta)
> + psi_account_irqtime(rq->curr, irq_delta);
> delayacct_irq(rq->curr, irq_delta);
Erm, if irq_delta is zero, then a whole bunch of code around the place you
modified becomes NOP as well, right?
Thanks,
Ingo
prev parent reply other threads:[~2023-09-28 21:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 13:15 [PATCH] psi: update psi irqtime when the irq delta is nozero Lu Jialin
2023-08-11 6:43 ` Chengming Zhou
2023-09-28 21:26 ` Ingo Molnar [this message]
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=ZRXvoq6uNk4+cs7Q@gmail.com \
--to=mingo@kernel.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lujialin4@huawei.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.