From: Tianchen Ding <dtcccc@linux.alibaba.com>
To: Xuewen Yan <xuewen.yan@unisoc.com>
Cc: vincent.guittot@linaro.org, peterz@infradead.org,
mingo@redhat.com, juri.lelli@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, vschneid@redhat.com,
linux-kernel@vger.kernel.org, ke.wang@unisoc.com,
di.shen@unisoc.com, xuewen.yan94@gmail.com
Subject: Re: [RFC PATCH V2 1/3] sched/fair: Fixup-wake_up_sync-vs-DELAYED_DEQUEUE
Date: Wed, 19 Mar 2025 17:05:44 +0800 [thread overview]
Message-ID: <aa2205ab-de8e-4ea0-b9fc-56208ccd30ba@linux.alibaba.com> (raw)
In-Reply-To: <20250303105241.17251-2-xuewen.yan@unisoc.com>
Hi Xuewen,
On 3/3/25 6:52 PM, Xuewen Yan wrote:
> Delayed dequeued feature keeps a sleeping task enqueued until its
> lag has elapsed. As a result, it stays also visible in rq->nr_running.
> So when in wake_affine_idle(), we should use the real running-tasks
> in rq to check whether we should place the wake-up task to
> current cpu.
> On the other hand, add a helper function to return the nr-delayed.
>
> Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue")
> Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
We noticed that your patch can fix a regression introduced by DELAY_DEQUEUE
in lmbench lat_ctx.
Here's the performance data running
`./lat_ctx -P $(nproc) 96`
on an intel SPR server with 192 CPUs (smaller is better):
DELAY_DEQUEUE 9.71
NO_DELAY_DEQUEUE 4.02
DELAY_DEQUEUE + this_patch 3.86
Also on an aarch64 server with 128 CPUs:
DELAY_DEQUEUE 14.82
NO_DELAY_DEQUEUE 5.62
DELAY_DEQUEUE + this_patch 4.66
We found the lmbench lat_ctx regression when enabling DELAY_DEQUEUE, with
cpu-migrations increasing more than 100 times, higher nr_wakeups_migrate,
nr_wakeups_remote, nr_wakeups_affine, nr_wakeups_affine_attempts and lower
nr_wakeups_local.
We think this benchmark prefers waker and wakee staying on the same cpu,
but WA_IDLE failed to reach this due to sched_delay noise. So your patch
does fix it.
Feel free to add
Reviewed-and-tested-by: Tianchen Ding <dtcccc@linux.alibaba.com>
Thanks.
next prev parent reply other threads:[~2025-03-19 9:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 10:52 [RFC PATCH V2 0/3] sched/fair: Fix nr-running vs delayed-dequeue Xuewen Yan
2025-03-03 10:52 ` [RFC PATCH V2 1/3] sched/fair: Fixup-wake_up_sync-vs-DELAYED_DEQUEUE Xuewen Yan
2025-03-19 9:05 ` Tianchen Ding [this message]
2025-03-19 9:34 ` Vincent Guittot
2025-05-20 6:00 ` Xuewen Yan
2025-05-21 12:06 ` [tip: sched/core] sched/fair: Fixup wake_up_sync() vs DELAYED_DEQUEUE tip-bot2 for Xuewen Yan
2025-03-03 10:52 ` [RFC PATCH V2 2/3] sched/fair: Do not consider the sched-delayed task when yield Xuewen Yan
2025-03-03 10:52 ` [RFC PATCH V2 3/3] sched: Do not consider the delayed task when cpu is about to enter idle Xuewen Yan
2025-03-03 12:00 ` [RFC PATCH V2 0/3] sched/fair: Fix nr-running vs delayed-dequeue Peter Zijlstra
2025-03-04 1:56 ` Xuewen Yan
2025-03-05 8:17 ` Vincent Guittot
2025-03-06 7:33 ` Xuewen Yan
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=aa2205ab-de8e-4ea0-b9fc-56208ccd30ba@linux.alibaba.com \
--to=dtcccc@linux.alibaba.com \
--cc=bsegall@google.com \
--cc=di.shen@unisoc.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=ke.wang@unisoc.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=vschneid@redhat.com \
--cc=xuewen.yan94@gmail.com \
--cc=xuewen.yan@unisoc.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®