All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: linux-kernel@vger.kernel.org
Subject: cacheline alignment and per-cpu data
Date: Fri, 09 Jun 2006 09:40:49 -0600	[thread overview]
Message-ID: <44899681.6070003@nortel.com> (raw)


Someone asked me a question that I couldn't answer, so I thought I'd 
pass it on to here.

Suppose I declare an array of a struct type, where the size of the 
struct is not a multiple of the cacheline size.  Each element in the 
array is used by a different cpu.

If I understand it, this would mean that the last member in the data 
belonging to one cpu shares a cacheline with the first member in the 
data belonging to the next cpu.

Will this cause cacheline pingpong?  If I do this sort of thing do I 
need to ensure that the struct is a multiple of cacheline size (or 
specify cacheline alignement)?

Thanks,

Chris

             reply	other threads:[~2006-06-09 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-09 15:40 Chris Friesen [this message]
2006-06-09 15:56 ` cacheline alignment and per-cpu data Chase Venters
2006-06-12  9:17   ` Jes Sorensen

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=44899681.6070003@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.