[lkml]   [2009]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH UPDATED] percpu: use dynamic percpu allocator as the default percpu allocator

On Wed, 1 Apr 2009, Ingo Molnar wrote:
> The rest (unannotated variables) is to be assumed "access-rarely" or
> "we-dont-care", by default. This is actually 95% of the global
> variables.

I'm not at all convinced that this is a good option.

The thing is, things like "read_mostly" or "access_rarely" may talk about
how we access those individual variables, but you're missing a _huge_
chunk of the puzzle if you ignore the _correlations_ of those accesses
with accesses to other variables.

The thign is, if you have variables 'a' and 'b', and they are always
accessed together, then it's probably worth it to put them in the same

And that is true EVEN IF 'b' is basically read-only, but 'a' is always
written to. Marking 'a' as read-only or read-mostly is actually a bad
idea, since the only thing it can ever result in is a bigger cache

The fact that the read-only cacheline has "nicer" behavior is totally
irrelevant - it's still an extra cacheline that we're accessing. And they
aren't free, even if read-only cachelines that can be shared across CPU's
are certainly a lot cheaper than ones that bounce.


 \ /
  Last update: 2009-04-01 22:03    [W:0.155 / U:4.496 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site