Thread (8 messages) 8 messages, 4 authors, 2011-02-18

some questions about kernel source

From: Mulyadi Santosa <hidden>
Date: 2011-02-16 09:00:33

Hi :)

On Wed, Feb 16, 2011 at 12:59, Rajat Jain [off-list ref] wrote:
Hello loody,
quoted
1. in kernel/trace, I always see "__read_mostly" at the end of
parameter is that a compiler optimization parameter?
Yes, it is a hint to the compiler that the parameter is mostly read, thus if the compiler has to make a decision between optimizing one of the read / write paths, it will optimize the read path even at the expense of write path.

To be precise, they will be grouped into same cache line as much as
possible. By doing so, those cache line won't be invalidated so often
(keeping them "hot" :) hehehhe )

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help