mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Tianchen Ding <dtcccc@linux.alibaba.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	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>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] sched: Queue task on wakelist in the same llc if the wakee cpu is idle
Date: Fri, 13 May 2022 08:37:29 +0200	[thread overview]
Message-ID: <20220513063729.GF76023@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220513062427.2375743-1-dtcccc@linux.alibaba.com>

On Fri, May 13, 2022 at 02:24:27PM +0800, Tianchen Ding wrote:
> We notice the commit 518cd6234178 ("sched: Only queue remote wakeups
> when crossing cache boundaries") disabled queuing tasks on wakelist when
> the cpus share llc. This is because, at that time, the scheduler must
> send IPIs to do ttwu_queue_wakelist.

No; this was because of cache bouncing.

> Nowadays, ttwu_queue_wakelist also
> supports TIF_POLLING, so this is not a problem now when the wakee cpu is
> in idle polling.
> 
> Benefits:
>   Queuing the task on idle cpu can help improving performance on waker cpu
>   and utilization on wakee cpu, and further improve locality because
>   the wakee cpu can handle its own rq. This patch helps improving rt on
>   our real java workloads where wakeup happens frequently.
> 
> Does this patch bring IPI flooding?
>   For archs with TIF_POLLING_NRFLAG (e.g., x86), there will be no
>   difference if the wakee cpu is idle polling. If the wakee cpu is idle
>   but not polling, the later check_preempt_curr() will send IPI too.
> 
>   For archs without TIF_POLLING_NRFLAG (e.g., arm64), the IPI is
>   unavoidable, since the later check_preempt_curr() will send IPI when
>   wakee cpu is idle.
> 
> Benchmark:
> running schbench -m 2 -t 8 on 8269CY:
> 
> without patch:
> Latency percentiles (usec)
>         50.0000th: 10
>         75.0000th: 14
>         90.0000th: 16
>         95.0000th: 16
>         *99.0000th: 17
>         99.5000th: 20
>         99.9000th: 23
>         min=0, max=28
> 
> with patch:
> Latency percentiles (usec)
>         50.0000th: 6
>         75.0000th: 8
>         90.0000th: 9
>         95.0000th: 9
>         *99.0000th: 10
>         99.5000th: 10
>         99.9000th: 14
>         min=0, max=16
> 
> We've also tested unixbench and see about 10% improvement on Pipe-based
> Context Switching, and no performance regression on other test cases.
> 
> For arm64, we've tested schbench and unixbench on Kunpeng920, the
> results show that,

What is a kunpeng and how does it's topology look?

> the improvement is not as obvious as on x86, and
> there's no performance regression.

x86 is wide and varied; what x86 did you test?

  reply	other threads:[~2022-05-13  6:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13  6:24 Tianchen Ding
2022-05-13  6:37 ` Peter Zijlstra [this message]
2022-05-13  7:05   ` Tianchen Ding
2022-05-17 13:58 ` Mel Gorman
2022-05-18  8:05   ` Tianchen Ding

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=20220513063729.GF76023@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=dtcccc@linux.alibaba.com \
    --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®