From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 1 May 2009 09:52:18 -0400 (EDT) From: Christoph Lameter Subject: Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h In-Reply-To: <20090501094407.GD18326@uranus.ravnborg.org> Message-ID: References: <1241119956-31453-1-git-send-email-tabbott@mit.edu> <1241119956-31453-2-git-send-email-tabbott@mit.edu> <1241119956-31453-3-git-send-email-tabbott@mit.edu> <1241119956-31453-4-git-send-email-tabbott@mit.edu> <1241119956-31453-5-git-send-email-tabbott@mit.edu> <1241119956-31453-6-git-send-email-tabbott@mit.edu> <1241119956-31453-7-git-send-email-tabbott@mit.edu> <20090501094407.GD18326@uranus.ravnborg.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: Sam Ravnborg Cc: Tim Abbott , Anders Kaseorg , Waseem Daher , Denys Vlasenko , Jeff Arnold , Benjamin Herrenschmidt , Bryan Wu , Chris Zankel , Cyrill Gorcunov , David Howells , "David S. Miller" , dev-etrax@axis.com, 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 , linux-alpha@vger.kernel.org, linux-am33-list@redhat.com, linux-arm-kernel@lists.arm.linux.org.uk, linux-ia64@vger.kernel.org, linux-m32r@ml.linux-m32r.org, linux-m68k@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, Martin Schwidefsky , Michal Simek , microblaze-uclinux@itee.uq.edu.au, Mikael Starvik , Paul Mackerras , Paul Mundt , Ralf Baechle , Richard Henderson , Roman Zippel , Russell King , sparclinux@vger.kernel.org, Thomas Gleixner , Tony Luck , uclinux-dist-devel@blackfin.uclinux.org, user-mode-linux-devel@lists.sourceforge.net, Yoshinori Sato List-ID: 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? Yes. 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.