lkml.org 
[lkml]   [2009]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] ia64: allocate percpu area for cpu0 like percpu areas for other cpus
Christoph Lameter wrote:
> On Tue, 22 Sep 2009, Tejun Heo wrote:
>
>> +#ifdef CONFIG_SMP
>> + . = ALIGN(PERCPU_PAGE_SIZE);
>> + __cpu0_per_cpu = .;
>
> __per_cpu_start?
>
>> + . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
>> +#endif
>
> This is a statically sized per cpu area that is used by __get_cpu_var()
> Data is access via a cpu specific memory mapping. How does this work when
> the area grows beyond PERCPU_PAGE_SIZE? As far as I can see: It seems
> that __get_cpu_var would then cause a memory fault?

On ia64, the first chunk is fixed at PERCPU_PAGE_SIZE. It's something
hardwired into the page fault logic and the linker script. Build will
fail if the static + reserved area goes over PERCPU_PAGE_SIZE and in
that case ia64 will need to update the special case page fault logic
and increase PERCPU_PAGE_SIZE. The area reserved above is interim
per-cpu area for cpu0 which is used between head.S and proper percpu
area setup and will be ditched once initialization is complete.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2009-09-23 04:13    [W:0.176 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site