All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	David Miller <davem@davemloft.net>, Robin Holt <holt@sgi.com>
Subject: Re: [PATCH] module: struct module_ref should contains long fields
Date: Fri, 16 Dec 2011 07:54:08 -0800	[thread overview]
Message-ID: <20111216155408.GA31770@google.com> (raw)
In-Reply-To: <1324012057.2562.23.camel@edumazet-laptop>

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

  reply	other threads:[~2011-12-16 15:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16  5:07 [PATCH] module: struct module_ref should contains long fields Eric Dumazet
2011-12-16 15:54 ` Tejun Heo [this message]
2011-12-16 16:01   ` Eric Dumazet
2011-12-16 16:05     ` Tejun Heo
2011-12-16 16:36       ` Eric Dumazet
2011-12-19  5:48         ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111216155408.GA31770@google.com \
    --to=tj@kernel.org \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=holt@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.