Messages in this thread | | | Date | Fri, 16 Dec 2011 07:54:08 -0800 | From | Tejun Heo <> | Subject | Re: [PATCH] module: struct module_ref should contains long fields |
| |
Hello, Eric.
On Fri, Dec 16, 2011 at 06:07:37AM +0100, Eric Dumazet wrote: > +struct module_ref { > + unsigned long incs; > + unsigned long decs; > +} __attribute((aligned(2 * sizeof(unsigned long))));
Why not ____cacheline_aligned? Another thing is that for percpu memory, packing could be better or at least shouldn't be worse. Percpu area usages are likely to be local so one major benefit of cacheline alignment - avoiding cacheline pingpong - goes away. The constant is called SMP_CACHE_BYTES after all.
Thanks.
-- tejun
| |