lkml.org 
[lkml]   [2004]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [: Re: [PATCH] shrink per_cpu_pages to fit 32byte cacheline]


On Thu, 23 Sep 2004, Marcelo Tosatti wrote:

> Forgot to CC linux-kernel, just in case someone else
> can have useful information on this matter.
>
> Andi says any additional overhead will be in the noise
> compared to cacheline saving benefit.
>
> ***********
>
> Within the Linux kernel we can benefit from changing some fields
> of commonly accessed data structures to 16 bit instead of 32 bits,
> given that the values for these fields never reach 2 ^ 16.
>
> Arjan warned me, however, that the prefix (in this case "data16") will
> cause an additional extra cycle in instruction decoding, per message above.
>
> Can you confirm that please? We can't seem to be able to find
> it in Intel's documentation.
>
> By shrinking two fields of "per_cpu_pages" structure we can fit it
> in one 32-byte cacheline (<= Pentium III and probably several other
> embedded/whatnot architectures will benefit from such a change).

One cycle is a small overhead compared to the cost of a fetch from L2
cache or, even worse, a cache miss. Memory is terribly slow. I think that
nowadays we should design things trying to keep memory accesses as few as
possible.


--
Giuliano.
-
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: 2005-03-22 14:06    [W:0.174 / U:2.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site