[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111216155408.GA31770@google.com>
Date: Fri, 16 Dec 2011 07:54:08 -0800
From: Tejun Heo <tj@...nel.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Rusty Russell <rusty@...tcorp.com.au>,
linux-kernel <linux-kernel@...r.kernel.org>,
David Miller <davem@...emloft.net>, Robin Holt <holt@....com>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists