Ravikiran wrote:
> The idea behind __read_mostly is to separate variables like cpu maps,
> bootcpuinfo etc which are written to very very rarely -- during
> initialization/hot-plugging, but read quite often something like ~100 % read
> ratio.
So these variables are __read_hot_write_cold?
In other words, the name __read_mostly is a little misleading, in my
book. That name only suggests read much more than written. In your
words:
something like 99:1 read
It doesn't state that the variable is so "read hot", it is worth keeping
off "write hot" cache lines.
Let's say for example we have a variable is accessed only once per
hour, and that this access is always a read except once a week (once
every 168 hours) when it is a write.
I would not mark that variable __read_mostly, even though it passed
your 99:1 test. That variable is read_cold_write_evencolder. It's an
ideal candidate for the canon fodder that we use to fill up the rest
of a cache line that has a hot variable.
If Andrew's suggestion to remove __read_mostly doesn't fly, then I'd
vote for a name change:
__read_mostly ==> __read_hot_write_cold
I think we want to identify the hottest memory words, keeping them
on separate cache lines, except that __read_hot_write_cold words can
share cache lines with each other.
A given cache line would have at most one hot write word, or one or
more read hot, write cold words.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]