From: Abel Wu <wuyun.abel@bytedance.com>
To: K Prateek Nayak <kprateek.nayak@amd.com>,
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>,
Valentin Schneider <vschneid@redhat.com>,
Josh Don <joshdon@google.com>,
Tianchen Ding <dtcccc@linux.alibaba.com>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: "open list:SCHEDULER" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 0/2] Prioritize idle cpus over SCHED_IDLE ones
Date: Mon, 10 Mar 2025 16:25:15 +0800 [thread overview]
Message-ID: <93f93abd-92ae-4daa-b1aa-3dd5081b4651@bytedance.com> (raw)
In-Reply-To: <20250310074044.3656-1-wuyun.abel@bytedance.com>
loop Viresh Kumar
On 3/10/25 3:40 PM, Abel Wu wrote:
> Since commit
>
> 17346452b25b ("sched/fair: Make sched-idle CPU selection consistent")
>
> the SCHED_IDLE cpus are given equal or more preference over idle ones in
> fast- and slow-path of select_task_rq_fair(). This works well in flattened
> cgroup hierarchy, e.g. all tasks running inside root cgroup, but may not
> ideal in a deeper hierarchy where SCHED_IDLE doesn't mean anything between
> entities whose parents are different. Hence a SCHED_IDLE cpu does NOT
> necessarily implies any of the following:
>
> - It is a less loaded cpu (since the parent of its topmost idle
> ancestor could be a 'giant' entity with large cpu.weight).
>
> - It can be expected to be preempted by a newly woken task soon
> enough (which actually depends on their ancestors who have
> common parent).
>
> As a less loaded cpu probably has better ability to serve the newly
> woken task, which also applies to the SCHED_IDLE cpus that less loaded
> SCHED_IDLE cpu might be easier and faster preempted, let's not special
> case SCHED_IDLE cpus at least in slowpath when selecting.
>
> [ Plan to try the same in SIS, that is selecting a less loaded cpu
> and get rid of ambiguous sched_idle_cpu(). Comments and suggests
> are really appreciated. ]
>
> Some benchmarks are tested in a Intel(R) Xeon(R) CPU E5-2650 v4 machine
> based on tip/master ec3106906cbf, and are tested in following two setup:
>
> (t1) (t2)
> root root
> / \\ / \
> benchmark noise benchmark X
> \\
> noise
>
> where noise comes from a SCHED_IDLE cgroup. I didn't see an obvious diff
> in hackbench or tbench, but not schbench.
>
> vanilla-t1 patched-t1
> Lat 50.0th-qrtle-1 8.00 ( 0.00%) 8.00 ( 0.00%)
> Lat 90.0th-qrtle-1 13.00 ( 0.00%) 13.00 ( 0.00%)
> Lat 99.0th-qrtle-1 19.00 ( 0.00%) 18.00 ( 5.26%)
> Lat 99.9th-qrtle-1 22.00 ( 0.00%) 22.00 ( 0.00%)
> Lat 20.0th-qrtle-1 257.00 ( 0.00%) 259.00 ( -0.78%)
> Lat 50.0th-qrtle-2 8.00 ( 0.00%) 9.00 ( -12.50%)
> Lat 90.0th-qrtle-2 13.00 ( 0.00%) 13.00 ( 0.00%)
> Lat 99.0th-qrtle-2 19.00 ( 0.00%) 19.00 ( 0.00%)
> Lat 99.9th-qrtle-2 23.00 ( 0.00%) 24.00 ( -4.35%)
> Lat 20.0th-qrtle-2 484.00 ( 0.00%) 434.00 ( 10.33%)
> Lat 50.0th-qrtle-4 9.00 ( 0.00%) 9.00 ( 0.00%)
> Lat 90.0th-qrtle-4 14.00 ( 0.00%) 14.00 ( 0.00%)
> Lat 99.0th-qrtle-4 19.00 ( 0.00%) 19.00 ( 0.00%)
> Lat 99.9th-qrtle-4 25.00 ( 0.00%) 24.00 ( 4.00%)
> Lat 20.0th-qrtle-4 877.00 ( 0.00%) 857.00 ( 2.28%)
> Lat 50.0th-qrtle-8 9.00 ( 0.00%) 9.00 ( 0.00%)
> Lat 90.0th-qrtle-8 14.00 ( 0.00%) 15.00 ( -7.14%)
> Lat 99.0th-qrtle-8 20.00 ( 0.00%) 21.00 ( -5.00%)
> Lat 99.9th-qrtle-8 26.00 ( 0.00%) 26.00 ( 0.00%)
> Lat 20.0th-qrtle-8 1698.00 ( 0.00%) 1598.00 ( 5.89%)
> Lat 50.0th-qrtle-16 10.00 ( 0.00%) 10.00 ( 0.00%)
> Lat 90.0th-qrtle-16 15.00 ( 0.00%) 15.00 ( 0.00%)
> Lat 99.0th-qrtle-16 20.00 ( 0.00%) 20.00 ( 0.00%)
> Lat 99.9th-qrtle-16 28.00 ( 0.00%) 27.00 ( 3.57%)
> Lat 20.0th-qrtle-16 2900.00 ( 0.00%) 2860.00 ( 1.38%)
> Lat 50.0th-qrtle-23 9.00 ( 0.00%) 9.00 ( 0.00%)
> Lat 90.0th-qrtle-23 15.00 ( 0.00%) 15.00 ( 0.00%)
> Lat 99.0th-qrtle-23 49.00 ( 0.00%) 28.00 ( 42.86%)
> Lat 99.9th-qrtle-23 1602.00 ( 0.00%) 1458.00 ( 8.99%)
> Lat 20.0th-qrtle-23 3796.00 ( 0.00%) 3804.00 ( -0.21%)
>
> vanilla-t2 patched-t2
> Lat 50.0th-qrtle-1 10.00 ( 0.00%) 9.00 ( 10.00%)
> Lat 90.0th-qrtle-1 271.00 ( 0.00%) 272.00 ( -0.37%)
> Lat 99.0th-qrtle-1 1013.00 ( 0.00%) 793.00 ( 21.72%)
> Lat 99.9th-qrtle-1 1998.00 ( 0.00%) 1642.00 ( 17.82%)
> Lat 20.0th-qrtle-1 262.00 ( 0.00%) 262.00 ( 0.00%)
> Lat 50.0th-qrtle-2 10.00 ( 0.00%) 9.00 ( 10.00%)
> Lat 90.0th-qrtle-2 531.00 ( 0.00%) 510.00 ( 3.95%)
> Lat 99.0th-qrtle-2 1034.00 ( 0.00%) 933.00 ( 9.77%)
> Lat 99.9th-qrtle-2 1846.00 ( 0.00%) 1614.00 ( 12.57%)
> Lat 20.0th-qrtle-2 517.00 ( 0.00%) 517.00 ( 0.00%)
> Lat 50.0th-qrtle-4 10.00 ( 0.00%) 10.00 ( 0.00%)
> Lat 90.0th-qrtle-4 523.00 ( 0.00%) 494.00 ( 5.54%)
> Lat 99.0th-qrtle-4 973.00 ( 0.00%) 901.00 ( 7.40%)
> Lat 99.9th-qrtle-4 1618.00 ( 0.00%) 1606.00 ( 0.74%)
> Lat 20.0th-qrtle-4 1015.00 ( 0.00%) 1001.00 ( 1.38%)
> Lat 50.0th-qrtle-8 11.00 ( 0.00%) 10.00 ( 9.09%)
> Lat 90.0th-qrtle-8 527.00 ( 0.00%) 454.00 ( 13.85%)
> Lat 99.0th-qrtle-8 931.00 ( 0.00%) 901.00 ( 3.22%)
> Lat 99.9th-qrtle-8 1598.00 ( 0.00%) 1582.00 ( 1.00%)
> Lat 20.0th-qrtle-8 1738.00 ( 0.00%) 1666.00 ( 4.14%)
> Lat 50.0th-qrtle-16 9.00 ( 0.00%) 9.00 ( 0.00%)
> Lat 90.0th-qrtle-16 410.00 ( 0.00%) 243.00 ( 40.73%)
> Lat 99.0th-qrtle-16 979.00 ( 0.00%) 891.00 ( 8.99%)
> Lat 99.9th-qrtle-16 1486.00 ( 0.00%) 1470.00 ( 1.08%)
> Lat 20.0th-qrtle-16 2708.00 ( 0.00%) 2708.00 ( 0.00%)
> Lat 50.0th-qrtle-23 8.00 ( 0.00%) 9.00 ( -12.50%)
> Lat 90.0th-qrtle-23 454.00 ( 0.00%) 303.00 ( 33.26%)
> Lat 99.0th-qrtle-23 3228.00 ( 0.00%) 2564.00 ( 20.57%)
> Lat 99.9th-qrtle-23 5496.00 ( 0.00%) 5304.00 ( 3.49%)
> Lat 20.0th-qrtle-23 3132.00 ( 0.00%) 3156.00 ( -0.77%)
>
> Abel Wu (2):
> Revert "sched/fair: Make sched-idle CPU selection consistent throughout"
> sched/fair: Do not specialcase SCHED_IDLE cpus in select slowpath
>
> kernel/sched/fair.c | 40 ++++++++++++++++++++++++----------------
> 1 file changed, 24 insertions(+), 16 deletions(-)
>
next prev parent reply other threads:[~2025-03-10 8:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 7:40 Abel Wu
2025-03-10 7:40 ` [RFC PATCH 1/2] Revert "sched/fair: Make sched-idle CPU selection consistent throughout" Abel Wu
2025-03-11 16:58 ` Vincent Guittot
2025-03-13 7:17 ` Abel Wu
2025-03-19 9:17 ` Vincent Guittot
2025-03-19 10:36 ` Abel Wu
2025-03-19 10:58 ` Vincent Guittot
2025-03-20 14:35 ` Abel Wu
2025-03-10 7:40 ` [RFC PATCH 2/2] sched/fair: Do not specialcase SCHED_IDLE cpus in select slowpath Abel Wu
2025-03-10 22:38 ` Josh Don
2025-03-11 16:43 ` Abel Wu
2025-03-12 19:24 ` Josh Don
2025-03-13 7:41 ` Abel Wu
2025-03-10 8:25 ` Abel Wu [this message]
2025-03-19 6:52 ` [RFC PATCH 0/2] Prioritize idle cpus over SCHED_IDLE ones Abel Wu
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=93f93abd-92ae-4daa-b1aa-3dd5081b4651@bytedance.com \
--to=wuyun.abel@bytedance.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=dtcccc@linux.alibaba.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@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 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®