Re: [PATCH] module: struct module_ref should contains long fields
From: Tejun Heo
Date: Fri Dec 16 2011 - 10:54:24 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/