lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240730082239.GF33588@noisy.programming.kicks-ass.net>
Date: Tue, 30 Jul 2024 10:22:39 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: wujing <realwujing@...com>
Cc: mingo@...hat.com, linux-kernel@...r.kernel.org, dongml2@...natelecom.cn,
	QiLiang Yuan <yuanql9@...natelecom.cn>
Subject: Re: [PATCH] sched/fair: Correct CPU selection from isolated domain

On Tue, Jul 30, 2024 at 03:10:50PM +0800, wujing wrote:
> 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

If you're trying to backport something, I think you forgot to Cc stable
and provide the proper upstream commit.

As is this isn't something I can do anything with. The patch does not
apply to any recent kernel and AFAICT this issue has long since been
fixed.

> 
> Signed-off-by: wujing <realwujing@...com>
> Signed-off-by: QiLiang Yuan <yuanql9@...natelecom.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;
> -- 
> 2.45.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ