lkml.org 
[lkml]   [2007]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 05/14] percpu: Use a Kconfig variable to configure arch specific percpu setup
On Wed, 28 Nov 2007, Jeremy Fitzhardinge wrote:

> > percpu references are quite frequent already (vm statistics) and will be
> > more frequent after we have converted the per cpu arrays to per cpu
> > allocations.
> >
>
> Well, I think the point is moot, because x86 will always use 32-bit
> offsets. Each reference will only be 1 byte bigger than a normal
> variable reference.

Just because i386 is not able to use it does not mean that other arches
are not. F.e. IA64 can embedd offsets in the actual instruction (but of
course not 64bit).

x86_64 can use a 32 bit offset instead of a 64 bit addres because it uses
the small model. A load of a 64 bit address would require much more
expensive instructions. A load of a 64 bit address is currently avoided
through the use of the pda that contains the full 64 bit address in the
data_offset field. Operations on per cpu data on x86_64 must therefore
first load data_offset via gs and then add the per cpu address to this
offset. Then the per cpu operation is performed on that address.

In order to avoid this situation through one instruction we need a small
32 bit offset relative to gs. Otherwise we cannot get away from the PDA
and the use of data_offset.


-
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: 2007-11-29 03:09    [W:0.059 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site