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: <715ff963-73fe-4479-bed7-8466597a1a70@igalia.com>
Date: Mon, 10 Feb 2025 23:59:29 +0900
From: Changwoo Min <changwoo@...lia.com>
To: lirongqing <lirongqing@...du.com>, tj@...nel.org, void@...ifault.com,
 arighi@...dia.com, mingo@...hat.com, peterz@...radead.org,
 juri.lelli@...hat.com, vincent.guittot@...aro.org, dietmar.eggemann@....com,
 rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
 vschneid@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched_ext: Take NUMA node into account when allocating
 per-CPU cpumasks

Hello,

On 25. 2. 10. 17:52, lirongqing wrote:
> From: Li RongQing <lirongqing@...du.com>
> 
> per-CPU cpumasks are dominantly accessed from their own local CPUs,
> so allocate them node-local to improve performance.
> 
> Signed-off-by: Li RongQing <lirongqing@...du.com>
> ---
>   kernel/sched/ext.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 8857c07..3fe5a2e 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -6325,15 +6325,16 @@ void __init init_sched_ext_class(void)
>   
>   	for_each_possible_cpu(cpu) {
>   		struct rq *rq = cpu_rq(cpu);
> +		int  n = cpu_to_node(cpu);
>   
>   		init_dsq(&rq->scx.local_dsq, SCX_DSQ_LOCAL);
>   		INIT_LIST_HEAD(&rq->scx.runnable_list);
>   		INIT_LIST_HEAD(&rq->scx.ddsp_deferred_locals);
>   
> -		BUG_ON(!zalloc_cpumask_var(&rq->scx.cpus_to_kick, GFP_KERNEL));
> -		BUG_ON(!zalloc_cpumask_var(&rq->scx.cpus_to_kick_if_idle, GFP_KERNEL));
> -		BUG_ON(!zalloc_cpumask_var(&rq->scx.cpus_to_preempt, GFP_KERNEL));
> -		BUG_ON(!zalloc_cpumask_var(&rq->scx.cpus_to_wait, GFP_KERNEL));
> +		BUG_ON(!zalloc_cpumask_var_node(&rq->scx.cpus_to_kick, GFP_KERNEL, n));
> +		BUG_ON(!zalloc_cpumask_var_node(&rq->scx.cpus_to_kick_if_idle, GFP_KERNEL, n));
> +		BUG_ON(!zalloc_cpumask_var_node(&rq->scx.cpus_to_preempt, GFP_KERNEL, n));
> +		BUG_ON(!zalloc_cpumask_var_node(&rq->scx.cpus_to_wait, GFP_KERNEL, n));
>   		init_irq_work(&rq->scx.deferred_irq_work, deferred_irq_workfn);
>   		init_irq_work(&rq->scx.kick_cpus_irq_work, kick_cpus_irq_workfn);
>   

The changes make sense to me. Thanks!

Acked-by: Changwoo Min <changwoo@...lia.com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ