From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Chen Yu <yu.c.chen@intel.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Valentin Schneider <vschneid@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Juri Lelli <juri.lelli@redhat.com>,
Swapnil Sapkal <Swapnil.Sapkal@amd.com>,
Aaron Lu <aaron.lu@intel.com>, Tim Chen <tim.c.chen@intel.com>,
"Gautham R . Shenoy" <gautham.shenoy@amd.com>,
x86@kernel.org
Subject: Re: [RFC PATCH v2 0/2] sched/fair migration reduction features
Date: Mon, 6 Nov 2023 12:36:28 +0530 [thread overview]
Message-ID: <a95bab2c-7f7a-18a2-6307-ffcdef4e2726@amd.com> (raw)
In-Reply-To: <ZUh/LK4iy3ukVaCn@chenyu5-mobl2.ccr.corp.intel.com>
Hello Chenyu,
On 11/6/2023 11:22 AM, Chen Yu wrote:
> On 2023-10-27 at 08:57:00 +0530, K Prateek Nayak wrote:
>> Hello Mathieu,
>>
>> On 10/19/2023 9:35 PM, Mathieu Desnoyers wrote:
>>> Hi,
>>>
>>> This series introduces two new scheduler features: UTIL_FITS_CAPACITY
>>> and SELECT_BIAS_PREV. When used together, they achieve a 41% speedup of
>>> a hackbench workload which leaves some idle CPU time on a 192-core AMD
>>> EPYC.
>>>
>>> The main metrics which are significantly improved are:
>>>
>>> - cpu-migrations are reduced by 80%,
>>> - CPU utilization is increased by 17%.
>>>
>>> Feedback is welcome. I am especially interested to learn whether this
>>> series has positive or detrimental effects on performance of other
>>> workloads.
>>
>> I got a chance to test this series on a dual socket 3rd Generation EPYC
>> System (2 x 64C/128T). Following is a quick summary:
>>
>> - stream and ycsb-mongodb don't see any changes.
>>
>> - hackbench and DeathStarBench see a major improvement. Both are high
>> utilization workloads with CPUs being overloaded most of the time.
>> DeathStarBench is known to benefit from lower migration count. It was
>> discussed by Gautham at OSPM '23.
>>
>> - tbench, netperf, and sch bench regresses. The former two when the
>> system is near fully loaded, and the latter for most cases.
>
> Does it mean hackbench gets benefits when the system is overloaded, while
> tbench/netperf do not get benefit when the system is underloaded?
Yup! Seems like that from the results. From what I have seen so far,
there seems to be a work conservation aspect to hackbench where if we
reduce the time spent in the kernel (by reducing time to decide on the
target which Mathieu's patch [this one] achieves, there is also a
second order effect from another one of Mathieu's Patches that uses
wakelist but indirectly curbs the SIS_UTIL limits based on Aaron's
observation [1] thus reducing time spent in select_idle_cpu())
hackbench results seem to improve.
[1] https://lore.kernel.org/lkml/20230905072141.GA253439@ziqianlu-dell/
schbench, tbench, and netperf see that wakeups are faster when the
client and server are on same LLC so consolidation as long as there is
one task per run queue for under loaded case is better than just keeping
them on separate LLCs.
>
>> All these benchmarks are client-server / messenger-worker oriented and is
>> known to perform better when client-server / messenger-worker are on
>> same CCX (LLC domain).
>
> I thought hackbench should also be of client-server mode, because hackbench has
> socket/pipe mode and exchanges datas between sender/receiver.
Yes but its N:M nature makes it slightly complicated to understand where
the cache benefits disappear and the work conservation benefits become
more prominent.
>
> This reminds me of your proposal to provide user hint to the scheduler
> to whether do task consolidation vs task spreading, and could this also
> be applied to Mathieu's case? For task or task group with "consolidate"
> flag set, tasks prefer to be woken up on target/previous CPU if the wakee
> fits into that CPU. In this way we could bring benefit and not introduce
> regress.
I think even a simple WF_SYNC check will help tbench and netperf case.
Let me get back to you with some data on different variants of hackbench
wit the latest tip.
>
> thanks,
> Chenyu
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2023-11-06 7:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 16:05 Mathieu Desnoyers
2023-10-19 16:05 ` [RFC PATCH v2 1/2] sched/fair: Introduce UTIL_FITS_CAPACITY feature (v2) Mathieu Desnoyers
2023-10-23 14:11 ` Dietmar Eggemann
2023-10-23 15:04 ` Mathieu Desnoyers
2023-10-24 6:10 ` Chen Yu
2023-10-24 14:49 ` Mathieu Desnoyers
2023-10-25 7:19 ` Chen Yu
2023-10-24 15:03 ` Dietmar Eggemann
2023-10-25 7:34 ` Chen Yu
2023-10-24 14:10 ` Dietmar Eggemann
2023-10-25 7:56 ` Peter Zijlstra
2023-10-25 14:04 ` Mathieu Desnoyers
2023-10-19 16:05 ` [RFC PATCH v2 2/2] sched/fair: Introduce SELECT_BIAS_PREV to reduce migrations Mathieu Desnoyers
2023-10-27 3:27 ` [RFC PATCH v2 0/2] sched/fair migration reduction features K Prateek Nayak
2023-11-06 5:52 ` Chen Yu
2023-11-06 7:06 ` K Prateek Nayak [this message]
2023-11-06 17:18 ` Mathieu Desnoyers
2023-11-07 3:02 ` K Prateek Nayak
2023-11-06 16:32 ` Mathieu Desnoyers
2023-11-09 14:58 ` Chen Yu
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=a95bab2c-7f7a-18a2-6307-ffcdef4e2726@amd.com \
--to=kprateek.nayak@amd.com \
--cc=Swapnil.Sapkal@amd.com \
--cc=aaron.lu@intel.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=gautham.shenoy@amd.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tim.c.chen@intel.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.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®