mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tianchen Ding <dtcccc@linux.alibaba.com>
To: Chengfeng Lin <lin2530632123@gmail.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
	Mike Galbraith <efault@gmx.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 7/7] sched/eevdf: Move to a single runqueue
Date: Tue, 3 Nov 2026 15:07:41 +0800	[thread overview]
Message-ID: <37fb82ff-ed5d-41d7-91b7-afe4379a636c@linux.alibaba.com> (raw)
In-Reply-To: <CANGjgd=yr4Zy+SMUsDnBSw05hhn9086NVc9g9SaG0y804=WWrg@mail.gmail.com>

Hi Chengfeng,


We also observed a regression in a pipe-based context-switch benchmark and 
bisected it to commit 333238da9a19 ("sched: Update time before requeueing 
delayed entities").

Our working explanation is that updating curr before calculating the delayed 
wakee's lag advances the runqueue's average virtual runtime. With DELAY_ZERO 
enabled, the wakee's positive lag is clipped to zero, triggering repositioning. 
With only curr and the wakee in the same cfs_rq, this can align the wakee's 
vruntime with curr's, making both tasks eligible.

Curr can then retain the CPU through slice protection. With equal weights and 
slices, the wakee's newly assigned deadline can also be later than curr's 
remaining deadline.

Before this commit, the wakee would commonly preempt curr after being woken by 
curr's pipe write, while curr remained runnable. After the commit, curr 
typically continues until its subsequent read finds the reply pipe empty, then 
blocks and voluntarily switches out. We believe this change is the main cause of 
the benchmark performance regression.

We observed a throughput recovery after disabling DELAY_ZERO. It would be useful 
to try this with your benchmark as well.

With 333238da9a19 retained, lag compensation on delayed requeue uses up-to-date 
runtime accounting. Should we consider making DELAY_ZERO default-off?

Thanks.


  parent reply	other threads:[~2026-11-03  7:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 13:03 Chengfeng Lin
2026-10-30 17:01 ` Mike Galbraith
2026-11-01 14:37   ` Chengfeng Lin
2026-11-01 17:46     ` Mike Galbraith
2026-11-02  7:58       ` Chengfeng Lin
2026-11-03  5:28         ` Mike Galbraith
2026-11-03  7:07 ` Tianchen Ding [this message]
2026-11-03  9:46   ` Chengfeng Lin
  -- strict thread matches above, loose matches on Subject: below --
2026-06-05 12:40 [PATCH v3 0/7] sched: Flatten the pick 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-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 12:05                   ` Jakub Okoński
2026-10-30 15:48       ` Chengfeng Lin
2026-10-22  2:12     ` Mike Galbraith

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=37fb82ff-ed5d-41d7-91b7-afe4379a636c@linux.alibaba.com \
    --to=dtcccc@linux.alibaba.com \
    --cc=efault@gmx.de \
    --cc=juri.lelli@redhat.com \
    --cc=lin2530632123@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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®