From: zhengzucheng <zhengzucheng@huawei.com>
To: wujing <realwujing@qq.com>, <mingo@redhat.com>, <peterz@infradead.org>
Cc: <linux-kernel@vger.kernel.org>, <dongml2@chinatelecom.cn>,
QiLiang Yuan <yuanql9@chinatelecom.cn>
Subject: Re: [PATCH] sched/fair: Correct CPU selection from isolated domain
Date: Tue, 30 Jul 2024 17:02:28 +0800 [thread overview]
Message-ID: <2c7d8983-2004-4886-32b2-93091a0c0679@huawei.com> (raw)
In-Reply-To: <tencent_E2C5C1A1B50F453656C6C7FB140CD3AFB305@qq.com>
it has already been addressed by the following patches in tip/sched/core:
8aeaffef8c6e ("sched/fair: Take the scheduling domain into account in
select_idle_smt()")
23d04d8c6b8e ("sched/fair: Take the scheduling domain into account in
select_idle_core()")
在 2024/7/30 15:10, wujing 写道:
> We encountered an issue where the kernel thread `ksmd` runs on the PMD
> dedicated isolated core, leading to high latency in OVS packets.
>
> Upon analysis, we discovered that this is caused by the current
> select_idle_smt() function not taking the sched_domain mask into account.
>
> Kernel version: linux-4.19.y
>
> Signed-off-by: wujing <realwujing@qq.com>
> Signed-off-by: QiLiang Yuan <yuanql9@chinatelecom.cn>
> ---
> kernel/sched/fair.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 09f82c84474b..0950cabfc1d0 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6171,7 +6171,8 @@ static int select_idle_smt(struct task_struct *p, struct sched_domain *sd, int t
> return -1;
>
> for_each_cpu(cpu, cpu_smt_mask(target)) {
> - if (!cpumask_test_cpu(cpu, &p->cpus_allowed))
> + if (!cpumask_test_cpu(cpu, &p->cpus_allowed) ||
> + !cpumask_test_cpu(cpu, sched_domain_span(sd)))
> continue;
> if (available_idle_cpu(cpu))
> return cpu;
next prev parent reply other threads:[~2024-07-30 9:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 7:10 wujing
2024-07-30 8:22 ` Peter Zijlstra
2024-07-30 9:03 ` wujing
2024-07-30 9:11 ` Greg KH
2024-07-30 9:25 ` wujing
2024-07-30 9:30 ` wujing
2024-07-30 9:41 ` Greg KH
2024-07-30 9:40 ` wujing
2024-07-30 9:51 ` Greg KH
2024-07-30 10:11 ` wujing
2024-07-30 10:20 ` Greg KH
2024-07-30 9:02 ` zhengzucheng [this message]
2024-07-30 7:59 wujing
2025-01-06 9:26 wujing
2025-01-06 9:51 ` Greg KH
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=2c7d8983-2004-4886-32b2-93091a0c0679@huawei.com \
--to=zhengzucheng@huawei.com \
--cc=dongml2@chinatelecom.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=realwujing@qq.com \
--cc=yuanql9@chinatelecom.cn \
/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®