Re: [PACH] smp: uninline num_online_cpus() & num_possible_cpus()

From: Eric Dumazet
Date: Tue Dec 09 2008 - 01:36:21 EST


Rusty Russell a écrit :
> On Saturday 06 December 2008 04:03:44 Eric Dumazet wrote:
>> num_online_cpus() and num_possible_cpus() are not performance
>> critical and are quite large.
>>
>> Unlining them shrinks kernel text size by 7523 bytes on x86,
>> if NR_CPUS>32
>
> Hi Eric!
>
> Slight misdiagnosis, I think. One base problem is addressed in fixing
> the bitmap operators (see "[PATCH] bitmap: test for constant as well as
> small size for inline versions" on lkml Message-Id: <200811160907.07140.rusty@xxxxxxxxxxxxxxx>). This is already in
> linux-next, and I've pasted it below.
>
> Worse, you used the obsolete cpumask operators :)
>

I see ! Good work ;)

So the gain would be 11 bytes per call site, and about one hundred calls,
maybe not worth it :)

Thanks


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/