lkml.org 
[lkml]   [2012]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] Avoid mask based num_possible_cpus and num_online_cpus
From
On Thu, Jan 19, 2012 at 12:40 PM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:
> On 1/19/2012 3:01 PM, Venkatesh Pallipadi wrote:
>> Does this look better? Will send separate patch to fix code
>> using num_possible_cpus() when they actually need nr_cpu_ids.
>
> Sound ok to me. but I have two requests.
>
>  - Please mesure how much time (or cycle) spented by cpumask_weight(cpu_possible_mask).

On two of the recentish x86 server CPUs, __sw_hweight64() base
mask_weight() takes ~300 cycles. popcnt instruction based weight takes
<10 cycles.

>  - After your patch, nr_possible_cpus() return different value from before.

Yes. I have tested this on x86 and haven't seen any problem.

>   Please verify this change doesn't makes any side effect.
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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