From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: Re: [PATCH 6/6] Add support for __read_mostly to linux/cache.h Date: Fri, 1 May 2009 09:52:18 -0400 (EDT) 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> Reply-To: microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ@public.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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-VrBV9hrLPhE@public.gmane.org, Geert Uytterhoeven , Greg Ungerer , Haavard Skinnemoen , Heiko Carstens , Helge Deller , Hirokazu Takata , "H. Peter Anvin" , Ingo Molnar , Jeff Dike , Jesper Nilsso To: Sam Ravnborg Return-path: In-Reply-To: <20090501094407.GD18326-QabhHTsIXMSnlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org> 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.