The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Chen Yu <yu.c.chen@intel.com>
To: Honglei Wang <jameshongleiwang@126.com>
Cc: Oliver Sang <oliver.sang@intel.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>,
	Valentin Schneider <vschneid@redhat.com>,
	"Chunxin Zang" <zangchunxin@lixiang.com>,
	<linux-kernel@vger.kernel.org>, Chen Yu <yu.chen.surf@gmail.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>
Subject: Re: [PATCH v2] sched/eevdf: Fix wakeup-preempt by checking cfs_rq->nr_running
Date: Mon, 30 Sep 2024 10:22:17 +0800	[thread overview]
Message-ID: <ZvoLWQICLdTonRE/@chenyu5-mobl2> (raw)
In-Reply-To: <8282e4e8-6d71-4402-9eed-38865a3fc6f3@126.com>

On 2024-09-30 at 10:04:13 +0800, Honglei Wang wrote:
> Hi Oliver,
> 
> On 2024/9/29 21:51, Oliver Sang wrote:
> > hi, Chenyu and Honglei,
> > 
> > On Sat, Sep 28, 2024 at 02:28:30PM +0800, Chen Yu wrote:
> >> Hi Honglei,
> >>
> >> On 2024-09-27 at 21:38:53 +0800, Honglei Wang wrote:
> >>> Hi Yu,
> >>>
> >>> Yep, I understand the preemption should happen in the same cfs level. Just
> >>> not sure the purpose of the 'nr_running check' stuff. Perhaps its role is
> >>> just to judge whether it’s necessary to do the preemption check. If there is
> >>> at least one more ready (cfs) task in the rq and current is not eligible, we
> >>> take care of the waiting tasks. Thoughts?
> >>
> >> I got your point and it makes sense. Whether the preemption check should be triggered
> >> seems to be a heuristic trade-off to me. I'm ok with using more aggressive preemption
> >> strategy as it depends on whether that workload prefers latency or throughput, and as
> >> long as it did not introduce regression :-)
> >>
> >> Oliver, may I know if you happen to have time for a test if the following change
> >> suggested by Honglei would make the regression go away? Thanks.
> > 
> > I applied the patch directly upon 85e511df3cec, the test found it can reduce the
> > regression but not totally reovered
> > 
> > =========================================================================================
> > compiler/cpufreq_governor/ipc/iterations/kconfig/mode/nr_threads/rootfs/tbox_group/testcase:
> >   gcc-12/performance/socket/4/x86_64-rhel-8.3/process/50%/debian-12-x86_64-20240206.cgz/lkp-spr-r02/hackbench
> > 
> > commit:
> >   82e9d0456e06 ("sched/fair: Avoid re-setting virtual deadline on 'migrations'")
> >   85e511df3cec ("sched/eevdf: Allow shorter slices to wakeup-preempt")
> >   8079496d311b  <--- patch from Honglei
> > 
> > 82e9d0456e06cebe 85e511df3cec46021024176672a 8079496d311b6b0d4dae973f4df
> > ---------------- --------------------------- ---------------------------
> >          %stddev     %change         %stddev     %change         %stddev
> >              \          |                \          |                \
> >     623219           -13.1%     541887            -3.2%     603080        hackbench.throughput
> > 
> 
> Thanks a lot for running the test. The result is as expectation, as the
> strategy of short slices tends to favor more frequent scheduling to help
> delay-sensitive tasks acquire CPU as early as possible.
> 
> I suspect that the current test environment does not have any special
> configurations for slices. In this case, a 3.2% regression is still
> somewhat significant. As Yu mentioned, this is a heuristic adjustment.
> In this particular case, it seems that Yu's patch is more effective in
> solving the problem. Let's delegate the preemption opportunity to the
> higher-level update_curr() function.
>

Thanks Oliver and Hongwei.

Hi Hongwei, do you mind if I added your Reviewed-by tag on this?

thanks,
Chenyu 

  reply	other threads:[~2024-09-30  2:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25  8:54 [PATCH v2] sched/eevdf: Fix wakeup-preempt by checking cfs_rq->nr_running Chen Yu
2024-09-27  1:54 ` Honglei Wang
2024-09-27  6:56   ` Chen Yu
2024-09-27 13:38     ` Honglei Wang
2024-09-28  6:28       ` Chen Yu
2024-09-29 13:51         ` Oliver Sang
2024-09-30  2:04           ` Honglei Wang
2024-09-30  2:22             ` Chen Yu [this message]
2024-09-30  6:11               ` Honglei Wang
2024-09-30  7:50 ` Peter Zijlstra
2024-09-30 11:01   ` Chen Yu
2024-10-04 10:16 ` [tip: sched/urgent] " tip-bot2 for 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=ZvoLWQICLdTonRE/@chenyu5-mobl2 \
    --to=yu.c.chen@intel.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=jameshongleiwang@126.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oliver.sang@intel.com \
    --cc=peterz@infradead.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=yu.chen.surf@gmail.com \
    --cc=zangchunxin@lixiang.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