Re: __read_mostly and __mp_friendly annotations

2010-06-07 Thread Matt Fleming
On Mon, 07 Jun 2010 07:51:18 -0700 (MST), Tim Rightnour wrote: > > I dug into this some, and I think it's a non-issue. On the bootloader I have > a > custom ldscript, so that base is covered fine. I'm not using any special > alignments on the rest of the kernel, so we should be ok. Sorry for

Re: __read_mostly and __mp_friendly annotations

2010-06-07 Thread Tim Rightnour
I dug into this some, and I think it's a non-issue. On the bootloader I have a custom ldscript, so that base is covered fine. I'm not using any special alignments on the rest of the kernel, so we should be ok. Sorry for the paranoia. On 06-Jun-2010 Matt Fleming wrote: > On Thu, 03 Jun 2010 07:

Re: __read_mostly and __mp_friendly annotations

2010-06-06 Thread Matt Fleming
On Thu, 03 Jun 2010 07:52:20 -0700 (MST), Tim Rightnour wrote: > > The only thing I'm not sure about, is if it's safe to use an alignment of 64 > on > powerpc. The issue is mostly that the powerpc cpus vary wildly in cacheline > sizes, and whinyness about alignment. I suspect it's not a big d

Re: __read_mostly and __mp_friendly annotations

2010-06-03 Thread Tim Rightnour
The only thing I'm not sure about, is if it's safe to use an alignment of 64 on powerpc. The issue is mostly that the powerpc cpus vary wildly in cacheline sizes, and whinyness about alignment. I suspect it's not a big deal, as the kernel isn't generally as picky as the bootloader is about align

Re: __read_mostly and __mp_friendly annotations

2010-06-02 Thread Matt Fleming
On Sun, 23 May 2010 10:43:21 +0100, Matt Fleming wrote: > Hi guys, > > below is a patch that introduces __read_mostly and __mp_friendly > annotations. These annotations allow infrequently modified data to be > grouped together and allow aligning data on cacheline boundaries.

Re: __read_mostly and __mp_friendly annotations

2010-05-27 Thread Matt Fleming
On Thu, 27 May 2010 18:03:19 +0100, Mindaugas Rasiukevicius wrote: > > Grouping, which in essence means that objects gets its own cacheline(s). > This is what user wants. While aligning, together with grouping, is just > a way to achieve that. Yeah, but I want to know what the annotation does,

Re: __read_mostly and __mp_friendly annotations

2010-05-27 Thread Nick Hudson
On Thursday 27 May 2010 18:03:19 Mindaugas Rasiukevicius wrote: [...] > P.S. Does the very last object (both of __read_mostly and __cacheline > areas) gets enough padded space? Only in some of the scripts. I guess this needs fixing. Nick

Re: __read_mostly and __mp_friendly annotations

2010-05-27 Thread Mindaugas Rasiukevicius
Matt Fleming wrote: > > > > Right, or just __cacheline, since it provides not only alignment. > > What else does it provide? The name should reflect what it does, that > is, align the data object on a cachline boundary. Grouping, which in essence means that objects gets its own cacheline(s). Th

Re: __read_mostly and __mp_friendly annotations

2010-05-27 Thread Matt Fleming
On Wed, 26 May 2010 05:00:14 +0100, Mindaugas Rasiukevicius wrote: > > Right, or just __cacheline, since it provides not only alignment. What else does it provide? The name should reflect what it does, that is, align the data object on a cachline boundary.

Re: __read_mostly and __mp_friendly annotations

2010-05-25 Thread Mindaugas Rasiukevicius
Matt Fleming wrote: > On Sun, 23 May 2010 12:20:15 +0200, Martin Husemann > wrote: > > Looks good, but the __mp_friendly name is not quite obvious. Why not call > > it __cacheline_aligned? > > I could have sworn that I called it that originally, but maybe not. I > definitely think __cacheline_al

Re: __read_mostly and __mp_friendly annotations

2010-05-23 Thread Matt Fleming
On Sun, 23 May 2010 12:20:15 +0200, Martin Husemann wrote: > Looks good, but the __mp_friendly name is not quite obvious. Why not call > it __cacheline_aligned? I could have sworn that I called it that originally, but maybe not. I definitely think __cacheline_aligned is a better name. I'll make

Re: __read_mostly and __mp_friendly annotations

2010-05-23 Thread Martin Husemann
Looks good, but the __mp_friendly name is not quite obvious. Why not call it __cacheline_aligned? Martin

__read_mostly and __mp_friendly annotations

2010-05-23 Thread Matt Fleming
Hi guys, below is a patch that introduces __read_mostly and __mp_friendly annotations. These annotations allow infrequently modified data to be grouped together and allow aligning data on cacheline boundaries. This helps to mitigate false-sharing. This patch has been passed around for about a