lkml.org 
[lkml]   [2015]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 2/8] init.h: add __read_mostly to early_param_on_off()
On Thu, 30 Apr 2015, Luis R. Rodriguez wrote:

> > But for every param declared this way? I'm not sure we want that...
>
> I'm glad you bring this up, Christoph can you or anyone else can you provide
> advise since you added __read_mostly ?

Well it should be reseved for data that is actually used frequently in hot
paths. Initially we only moved variables into __read_mostly after we saw
in performance traces that there was contention on an item because a
neighboring variable was frequently written to.

You want the __read_mostly data to be tighly packed. In the best case
multiple frequently read variables for a hot path will be next to each
other in order to reduce the number of cachelines needed to execute a
critical path. That means being selective and aware of which variables
actually benefit.


\
 
 \ /
  Last update: 2015-04-30 21:21    [W:4.174 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site