lkml.org 
[lkml]   [2006]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] reduce sizeof(percpu_data) and removes dependance against NR_CPUS
Andrew Morton a écrit :
> Eric Dumazet <dada1@cosmosbay.com> wrote:
>> Current sizeof(percpu_data) is NR_CPUS*sizeof(void *)
>>
>> This trivial patch makes percpu_data real size depends on
>> highest_possible_processor_id() instead of NR_CPUS
>>
>> percpu_data allocations are not performance critical, we can spend few CPU
>> cycles and save some ram.
>
> hm, highest_possible_processor_id() isn't very efficient. And it's quite
> dopey that it's a macro. We should turn it into a real function which
> caches its return result and goes BUG if it's called before
> cpu_possible_map is initialised.

I agree, I will see if I can do that without poking in every arch :(

More over, my patch has an error on pdsize computation, it should be :

size_t pdsize = (highest_possible_processor_id() + 1) * sizeof(void *);

Eric
-
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: 2006-01-05 15:37    [W:0.153 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site