[lkml]   [2012]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] lib/cpumask.c: Optimize __any_online_cpu() calculation
On 02/16/2012 04:21 AM, Rusty Russell wrote:

> On Wed, 15 Feb 2012 19:49:00 +0530, "Srivatsa S. Bhat" <> wrote:
>> On 02/15/2012 06:27 PM, Eric Dumazet wrote:
>>> Le mercredi 15 février 2012 à 18:05 +0530, Srivatsa S. Bhat a écrit :
>>>> __any_online_cpu() uses a for loop at the moment.
>>>> Instead, use cpumask_* operations to speed it up.
>>>> Signed-off-by: Srivatsa S. Bhat <>
>>>> ---
>>>> Actually, the patch posted at removed
>>>> the last user of any_online_cpu() (and hence __any_online_cpu()).
>>>> However, since this is an exported symbol, I refrained from removing this
>>>> function altogether.
>>> Just remove the export/function and eventually leave the helper ?
>>> #define any_online_cpu(mask) cpumask_any_and(mask, cpu_online_mask)
>> That sounds good. Here is v2 of the patch.
>> (Since this v2 touches include/linux/cpumask.h, I rebased it on top of the
>> patch posted at: Even without that
>> patch it should apply with minor line number changes..)
> No. Just git rid of the only caller of any_online_cpu():
> arch/ia64/kernel/smpboot.c:693: new_cpei_cpu = any_online_cpu(cpu_online_map);

My ia64 patch already got rid of that caller! So this patch should be fine as
is. And it looks like Andrew Morton has taken this patch into -mm. So nothing
more needs to be done about this :-)

Srivatsa S. Bhat

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2012-02-17 13:21    [W:0.047 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site