lkml.org 
[lkml]   [2021]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v6 1/9] smp: Run functions concurrently in smp_call_function_many_cond()
Date


> On Mar 1, 2021, at 9:10 AM, Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Sat, Feb 20, 2021 at 03:17:04PM -0800, Nadav Amit wrote:
>> + /*
>> + * Choose the most efficient way to send an IPI. Note that the
>> + * number of CPUs might be zero due to concurrent changes to the
>> + * provided mask.
>> + */
>> + if (nr_cpus == 1)
>> + arch_send_call_function_single_ipi(last_cpu);
>> + else if (likely(nr_cpus > 1))
>> + arch_send_call_function_ipi_mask(cfd->cpumask_ipi);
>
> I just ran into conflicts with another patch set, and noticed that the
> above should probably be:
>
> if (nr_cpus == 1)
> send_call_function_single_ipi(last_cpu);
> else if (likely(nr_cpus > 1))
> arch_send_call_function_ipi_mask(cfd->cpumask_ipi);
>
> Which will avoid the IPI when @last_cpu is idle.

Good point. Makes one wonder whether all these inter-core communication
(through cpu_tlbstate.is_lazy, csd->node.llist and ti->flags) are
really necessary or can be combined.

Well, that’s for later I presume.
\
 
 \ /
  Last update: 2021-03-02 03:10    [W:0.117 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site