From: Chen Yu <yu.c.chen@intel.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>
Cc: Mike Galbraith <efault@gmx.de>, Tim Chen <tim.c.chen@intel.com>,
Yujie Liu <yujie.liu@intel.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
"Gautham R . Shenoy" <gautham.shenoy@amd.com>,
Chen Yu <yu.chen.surf@gmail.com>,
linux-kernel@vger.kernel.org, Chen Yu <yu.c.chen@intel.com>
Subject: [PATCH 0/2] sched/fair: Enhance sync wakeup for short duration tasks
Date: Tue, 25 Jun 2024 15:21:49 +0800 [thread overview]
Message-ID: <cover.1719295669.git.yu.c.chen@intel.com> (raw)
Hi,
This is a respin of the previous work to inhit task migration[1].
Many workloads suffer from high Cache-to-Cache latency on large system. Especially
when different tasks access the same cache line, which brings false sharing.
This patch set leverages the WF_SYNC flag, and inhits task wakeup migration
for short duration ones. This can help reduce the chance to trigger the
cache false sharing.
The main concern of this proposal in the last discussion is that, it could
break idle-cpu-first task wakeup strategy. Usually an idle CPU can beat other
non-idle CPU in terms of latency. Based on this, the new proposal takes the
CPU number into consideration, if it is a low-core-count system, the bar to
inhit the task migration is much higher or even impossible. Vice versa. Meanwhile,
only when there is no idle Core in the system, this inhiting task migration will take
effect.
According to the test on 4 different platforms, it has shown good improvement for
Client/Server workloads, like netperf, tbench. And not saw any performance regression
on my 8 CPUs laptop. Please refer to PATCH 2/2 for detail.
Comments and tests would be appreciated.
[1] https://lore.kernel.org/lkml/cover.1682661027.git.yu.c.chen@intel.com/
Chen Yu (2):
sched/fair: Record the average duration of a task
sched/fair: Enhance sync wakeup for short duration tasks
include/linux/sched.h | 3 ++
kernel/sched/core.c | 2 ++
kernel/sched/fair.c | 74 ++++++++++++++++++++++++++++++++++++++---
kernel/sched/features.h | 1 +
4 files changed, 75 insertions(+), 5 deletions(-)
--
2.25.1
next reply other threads:[~2024-06-25 7:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 7:21 Chen Yu [this message]
2024-06-25 7:22 ` [PATCH 1/2] sched/fair: Record the average duration of a task Chen Yu
2024-06-26 4:21 ` Mike Galbraith
2024-06-30 13:09 ` Chen Yu
2024-07-01 6:57 ` Mike Galbraith
2024-07-01 14:57 ` Chen Yu
2024-07-02 5:08 ` Mike Galbraith
2024-07-03 8:34 ` Raghavendra K T
2024-07-03 11:57 ` Mike Galbraith
2024-07-03 13:23 ` Chen Yu
2024-07-03 13:45 ` Mike Galbraith
2024-07-03 13:40 ` Raghavendra K T
2024-07-03 13:12 ` Chen Yu
2024-07-03 13:46 ` Raghavendra K T
2024-08-05 4:38 ` Madadi Vineeth Reddy
2024-08-05 7:22 ` Chen Yu
2024-06-25 7:22 ` [PATCH 2/2] sched/fair: Enhance sync wakeup for short duration tasks 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=cover.1719295669.git.yu.c.chen@intel.com \
--to=yu.c.chen@intel.com \
--cc=efault@gmx.de \
--cc=gautham.shenoy@amd.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tim.c.chen@intel.com \
--cc=vincent.guittot@linaro.org \
--cc=yu.chen.surf@gmail.com \
--cc=yujie.liu@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;
as well as URLs for NNTP newsgroup(s).