lkml.org 
[lkml]   [2022]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/16] smp: optimize smp_call_function_many_cond() for more
On Mon, Jul 18, 2022 at 12:28:36PM -0700, Yury Norov wrote:

> ---
> kernel/smp.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/smp.c b/kernel/smp.c
> index 7ed2b9b12f74..f96fdf944b4a 100644
> --- a/kernel/smp.c
> +++ b/kernel/smp.c
> @@ -942,7 +942,11 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
>
> if (run_remote) {
> cfd = this_cpu_ptr(&cfd_data);
> - cpumask_and(cfd->cpumask, mask, cpu_online_mask);
> + if (mask == cpu_online_mask)
> + cpumask_copy(cfd->cpumask, cpu_online_mask);
> + else
> + cpumask_and(cfd->cpumask, mask, cpu_online_mask);
> +

Or... you could optimize cpumask_and() to detect the src1p == src2p case?

> __cpumask_clear_cpu(this_cpu, cfd->cpumask);
>
> cpumask_clear(cfd->cpumask_ipi);
> --
> 2.34.1
>

\
 
 \ /
  Last update: 2022-07-18 23:30    [W:0.199 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site