mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: "Jakub Okoński" <jakub@okonski.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	mingo@kernel.org
Cc: longman@redhat.com, chenridong@huaweicloud.com,
	juri.lelli@redhat.com,  vincent.guittot@linaro.org,
	dietmar.eggemann@arm.com, rostedt@goodmis.org,
	 bsegall@google.com, mgorman@suse.de, vschneid@redhat.com,
	tj@kernel.org,  hannes@cmpxchg.org, mkoutny@suse.com,
	cgroups@vger.kernel.org,  linux-kernel@vger.kernel.org,
	jstultz@google.com, kprateek.nayak@amd.com,  qyousef@layalina.io
Subject: Re: [PATCH v3 7/7] sched/eevdf: Move to a single runqueue
Date: Thu, 22 Oct 2026 04:12:20 +0200	[thread overview]
Message-ID: <40443762033546b89044587f40b21018971a9867.camel@gmx.de> (raw)
In-Reply-To: <58dc8e8a-7260-43ce-aebb-8d9c29a6afc9@okonski.org>

On Fri, 2026-10-16 at 15:18 +0200, Jakub Okoński wrote:
> Hi Peter,
> 
> On 6/5/26 14:40, Peter Zijlstra wrote:
> 
> > Change fair/cgroup to a single runqueue.
> > 
> > [...]
> > 
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -9916,7 +9837,6 @@ static void wakeup_preempt_fair(struct r
> >  	if (!sched_feat(WAKEUP_PREEMPTION))
> >  		return;
> >  
> > -	find_matching_se(&se, &pse);
> >  	WARN_ON_ONCE(!pse);
> >  
> >  	cse_is_idle = se_is_idle(se);
> 
> I think this changes how cpu.idle affects wakeup preemption.
> 
> With the single runqueue, find_matching_se() is gone and se_is_idle()
> reduces to task_has_idle_policy(). Wouldn't this mean that SCHED_NORMAL
> tasks in a cpu.idle cgroup are no longer treated as idle for
> wakeup_preempt_fair()?

Am I perhaps testing wrong?

What I do to produce the perf sched data below is stuff pinned hogs in
one cgroup, pinned wakelat in another, diddle the hog populated cgroup
cpu.idle... and watch wakelat blast straight through the hog between it
and the CPU just fine, regardless of cpu.idle state.

WRT the data, ignore perf's max below, take awk processed wakelat
output as gospel.  I can make the perf numbers match nearly perfects by
running all players in the background and terminating via a time event
but didn't bother here.  The important bits are accumulated runtime,
ctx switch count, and avg delay for the bottom two lines of each
report. Ignore report format, that's a local hacklet, and also ignore
the wakelat runtime delta between tested kernels when cpu.idle=0 in the
hog group, that's a DELAY_DEQUEUE issue I've verified to be the source
of the jitter I can reproduce.

BEGIN 7.3.0.g14c89774-master

7.3.0.g14c89774-master cgroupA-hogs-(cpu.idle=0)-vs-groupB-wakelat
wakeup latency >1ms: 4568  max: 2.4ms  stddev: 554.882
  ----------------------------------------------------------------------------------------------------------
  Task                    |    Runtime     |  Count   |    Avg delay    |    Max delay    |    Sum delay    |
  ----------------------------------------------------------------------------------------------------------
  cpuhog:1267             |      60.048 s  |       40 |        6.186 us |       43.523 us |      247.445 us |
  cpuhog:1269             |      60.047 s  |      102 |        8.867 us |      144.492 us |      904.512 us |
  cpuhog:1268             |      60.047 s  |      126 |       10.899 us |      774.840 us |        1.373 ms |
  cpuhog:1266             |      60.045 s  |       58 |       19.230 us |      531.945 us |        1.115 ms |
  cpuhog:1270             |      60.044 s  |       35 |        4.708 us |       32.297 us |      164.798 us |
  cpuhog:1264             |      60.033 s  |      492 |       27.200 us |        2.383 ms |       13.383 ms |
  cpuhog:1265             |      60.030 s  |      783 |       23.775 us |       83.871 us |       18.617 ms |
  cpuhog:1271             |      49.519 s  |    51947 |      202.691 us |        5.607 ms |       10.529 s  |
  wakelat:1277            |      10.512 s  |    52011 |      171.849 us |       10.416 ms |        8.938 s  |
  ----------------------------------------------------------------------------------------------------------
  TOTAL:                  |     480.376 s  |   107581 |                 |       10.416 ms |       19.627 s  |
  ----------------------------------------------------------------------------------------------------------

7.3.0.g14c89774-master cgroupA-hogs-(cpu.idle=1)-vs-groupB-wakelat
wakeup latency >1ms: 0  max: 0.0ms  stddev: 0.500
  ----------------------------------------------------------------------------------------------------------
  Task                    |    Runtime     |  Count   |    Avg delay    |    Max delay    |    Sum delay    |
  ----------------------------------------------------------------------------------------------------------
  cpuhog:1297             |      60.026 s  |       43 |        9.577 us |       83.461 us |      411.831 us |
  cpuhog:1298             |      60.024 s  |       27 |        4.094 us |       31.306 us |      110.547 us |
  cpuhog:1294             |      60.023 s  |       60 |       10.620 us |       52.234 us |      637.217 us |
  cpuhog:1296             |      60.022 s  |      131 |       15.621 us |      908.988 us |        2.046 ms |
  cpuhog:1293             |      60.019 s  |      224 |        6.861 us |      593.440 us |        1.537 ms |
  cpuhog:1292             |      60.006 s  |      690 |       28.075 us |      286.517 us |       19.372 ms |
  cpuhog:1295             |      60.005 s  |       26 |        4.119 us |       32.429 us |      107.111 us |
  cpuhog:1299             |      47.903 s  |    60216 |      201.386 us |        5.270 ms |       12.127 s  |
  wakelat:1305            |      12.124 s  |    60023 |        1.963 us |        2.156 ms |      117.862 ms |
  ----------------------------------------------------------------------------------------------------------
  TOTAL:                  |     480.196 s  |   122918 |                 |        5.270 ms |       12.394 s  |
  ----------------------------------------------------------------------------------------------------------

BEGIN 7.2.11-ag-flat+hack
Note: this tree has virgin flat applied, and the bisected commit reverted.

7.2.11-ag-flat+hack cgroupA-hogs-(cpu.idle=0)-vs-groupB-wakelat
wakeup latency >1ms: 0  max: 0.0ms  stddev: 0.438
  ----------------------------------------------------------------------------------------------------------
  Task                    |    Runtime     |  Count   |    Avg delay    |    Max delay    |    Sum delay    |
  ----------------------------------------------------------------------------------------------------------
  cpuhog:1272             |      60.040 s  |       44 |        6.139 us |       40.163 us |      270.136 us |
  cpuhog:1275             |      60.039 s  |      139 |        3.768 us |      185.461 us |      523.864 us |
  cpuhog:1276             |      60.039 s  |      140 |        5.432 us |       28.697 us |      760.493 us |
  cpuhog:1274             |      60.039 s  |      104 |       12.441 us |      814.146 us |        1.294 ms |
  cpuhog:1270             |      60.037 s  |      271 |       13.571 us |      637.071 us |        3.678 ms |
  cpuhog:1273             |      60.036 s  |       51 |       17.658 us |      439.987 us |      900.594 us |
  cpuhog:1271             |      60.018 s  |      636 |       28.960 us |      362.859 us |       18.419 ms |
  cpuhog:1277             |      47.902 s  |    60081 |      202.120 us |        9.812 ms |       12.144 s  |
  wakelat:1283            |      12.122 s  |    60016 |        1.905 us |        2.801 ms |      114.368 ms |
  ----------------------------------------------------------------------------------------------------------
  TOTAL:                  |     480.316 s  |   123011 |                 |        9.812 ms |       12.352 s  |
  ----------------------------------------------------------------------------------------------------------

7.2.11-ag-flat+hack cgroupA-hogs-(cpu.idle=1)-vs-groupB-wakelat
wakeup latency >1ms: 0  max: 0.0ms  stddev: 0.455
  ----------------------------------------------------------------------------------------------------------
  Task                    |    Runtime     |  Count   |    Avg delay    |    Max delay    |    Sum delay    |
  ----------------------------------------------------------------------------------------------------------
  cpuhog:1298             |      60.021 s  |      307 |        8.860 us |      272.423 us |        2.720 ms |
  cpuhog:1301             |      60.020 s  |       20 |        3.661 us |       30.994 us |       73.236 us |
  cpuhog:1303             |      60.020 s  |      135 |        2.070 us |       28.715 us |      279.571 us |
  cpuhog:1302             |      60.019 s  |       80 |       14.390 us |      782.611 us |        1.151 ms |
  cpuhog:1300             |      60.017 s  |       46 |       42.518 us |        1.656 ms |        1.956 ms |
  cpuhog:1299             |      60.005 s  |       22 |        6.165 us |       62.913 us |      135.646 us |
  cpuhog:1304             |      60.001 s  |      666 |       27.965 us |       92.954 us |       18.625 ms |
  cpuhog:1305             |      47.900 s  |    60084 |      201.849 us |        4.224 ms |       12.128 s  |
  wakelat:1311            |      12.124 s  |    60009 |        1.977 us |        1.440 ms |      118.685 ms |
  ----------------------------------------------------------------------------------------------------------
  TOTAL:                  |     480.165 s  |   122809 |                 |        4.224 ms |       12.364 s  |
  ----------------------------------------------------------------------------------------------------------


  parent reply	other threads:[~2026-10-22  2:12 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05 12:40 [PATCH v3 0/7] sched: Flatten the pick Peter Zijlstra
2026-06-05 12:40 ` [PATCH v3 1/7] sched/fair: Add cgroup_mode switch Peter Zijlstra
2026-06-30  9:03   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2026-06-05 12:40 ` [PATCH v3 2/7] sched/fair: Add cgroup_mode: up Peter Zijlstra
2026-06-05 15:07   ` Peter Zijlstra
2026-06-30  9:03   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2026-06-05 12:40 ` [PATCH v3 3/7] sched/fair: Add cgroup_mode: max Peter Zijlstra
2026-06-10 15:09   ` Waiman Long
2026-06-10 15:42     ` Waiman Long
2026-06-11 13:49       ` Peter Zijlstra
2026-06-11 13:47     ` Peter Zijlstra
2026-06-11 20:57       ` Waiman Long
2026-06-30  9:03   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2026-06-05 12:40 ` [PATCH v3 4/7] sched/fair: Add cgroup_mode: concur Peter Zijlstra
2026-06-30  9:03   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2026-06-05 12:40 ` [PATCH v3 5/7] sched/fair: Add cgroup_mode: tasks Peter Zijlstra
2026-06-30  9:03   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2026-06-05 12:40 ` [PATCH v3 6/7] sched/fair: Change the default cgroup_mode to concur Peter Zijlstra
2026-06-30  9:03   ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
2026-06-05 12:40 ` [PATCH v3 7/7] sched/eevdf: Move to a single runqueue Peter Zijlstra
2026-06-20  3:54   ` Chen, Yu C
2026-06-26 11:40     ` Peter Zijlstra
2026-06-29 14:02       ` Vincent Guittot
2026-06-30  9:03     ` [tip: sched/core] sched/fair: Fix overflow in update_tg_cfs_runnable() tip-bot2 for Chen, Yu C
2026-06-30  9:03   ` [tip: sched/core] sched/eevdf: Move to a single runqueue tip-bot2 for Peter Zijlstra (Intel)
2026-09-23 14:21   ` [REGRESSION] [PATCH v3 7/7] " Aishwarya Rambhadran
2026-09-23 16:48     ` Chen Yu
2026-09-24  7:05       ` K Prateek Nayak
2026-09-24  8:19       ` Mike Galbraith
2026-09-28  3:12         ` Chen Yu
2026-09-28 13:00           ` Mike Galbraith
2026-10-07 12:05             ` Aishwarya Rambhadran
2026-10-12 11:27               ` Mike Galbraith
2026-10-16 13:18   ` Jakub Okoński
2026-10-18  6:49     ` Mike Galbraith
2026-10-19 17:01       ` Vincent Guittot
2026-10-19 17:35         ` Jakub Okoński
2026-10-19 18:04           ` Vincent Guittot
2026-10-19 18:24             ` Jakub Okoński
2026-10-19 18:26               ` Vincent Guittot
2026-10-21 11:55                 ` Vincent Guittot
2026-10-22  2:12     ` Mike Galbraith [this message]
2026-06-09  5:37 ` [PATCH v3 0/7] sched: Flatten the pick K Prateek Nayak
2026-06-12  2:29 ` Shubhang Kaushik
2026-08-17 16:05 ` Szabina Korbai
2026-08-17 16:35   ` K Prateek Nayak
2026-08-18  9:04     ` Szabina Korbai
2026-08-18  9:16       ` Peter Zijlstra
2026-08-21 10:37         ` Szabina Korbai
2026-08-24 14:51         ` Chen Yu
2026-08-24 13:53           ` Peter Zijlstra

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=40443762033546b89044587f40b21018971a9867.camel@gmx.de \
    --to=efault@gmx.de \
    --cc=bsegall@google.com \
    --cc=cgroups@vger.kernel.org \
    --cc=chenridong@huaweicloud.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=hannes@cmpxchg.org \
    --cc=jakub@okonski.org \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=peterz@infradead.org \
    --cc=qyousef@layalina.io \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.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 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®