lkml.org 
[lkml]   [2011]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2011-12-16 16:57    [W:0.237 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site