lkml.org 
[lkml]   [2010]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch]x86: spread tlb flush vector between nodes
On 10/19/2010 06:13 PM, Shaohua Li wrote:
> On Tue, 2010-10-19 at 21:34 +0800, Andi Kleen wrote:
>>>
>>> +static int tlb_vector_offset[NR_CPUS] __read_mostly;
>>
>> Never use NR_CPUS. Always use per cpu data.
>>
>> Otherwise you waste a lot of space on a CONFIG_MAX_SMP
>> kernel running on a smaller box.
> ha, I want it to be __read_mostly to avoid cache pollution, apparently
> we have no per cpu API to do this. Maybe I need add one.
>

Quite possible, however, definitely percpu over a static array.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2010-10-20 04:43    [W:0.044 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site