[Top] [All Lists]

Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h

To: Sam Ravnborg <>
Subject: Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h
From: Christoph Lameter <>
Date: Fri, 1 May 2009 09:52:18 -0400 (EDT)
Cc: Tim Abbott <tabbott@MIT.EDU>, Anders Kaseorg <andersk@MIT.EDU>, Waseem Daher <wdaher@MIT.EDU>, Denys Vlasenko <>, Jeff Arnold <jbarnold@MIT.EDU>, Benjamin Herrenschmidt <>, Bryan Wu <>, Chris Zankel <>, Cyrill Gorcunov <>, David Howells <>, "David S. Miller" <>,, Geert Uytterhoeven <>, Greg Ungerer <>, Haavard Skinnemoen <>, Heiko Carstens <>, Helge Deller <>, Hirokazu Takata <>, "H. Peter Anvin" <>, Ingo Molnar <>, Jeff Dike <>, Jesper Nilsson <>, Kyle McMartin <>, Linus Torvalds <>,,,,,,,,,,,, Martin Schwidefsky <>, Michal Simek <>,, Mikael Starvik <>, Paul Mackerras <>, Paul Mundt <>, Ralf Baechle <>, Richard Henderson <>, Roman Zippel <>, Russell King <>,, Thomas Gleixner <>, Tony Luck <>,,, Yoshinori Sato <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <> <> <> <>
User-agent: Alpine 1.10 (DEB 962 2008-03-14)
On Fri, 1 May 2009, Sam Ravnborg wrote:

> Are there any specific reason why we do not support read_mostly on all
> architectures?

Not that I know of.

> read_mostly is about grouping rarely written data together
> so what is needed is to introduce this section in the remaining
> archtectures.
> Christoph - git log says you did the inital implmentation.
> Do you agree?


There is some concern that __read_mostly is needlessly applied to
numerous variables that are not used in hot code paths. This may make
__read_mostly ineffective and actually increase the cache footprint of a
function since global variables are no longer in the same cacheline. If
such a function is called and the caches are cold then two cacheline
fetches have to be done instead of one.

<Prev in Thread] Current Thread [Next in Thread>