From: David Chinner <dgc@sgi.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: David Chinner <dgc@sgi.com>, Lachlan McIlroy <lachlan@sgi.com>,
xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [Patch] Cacheline align xlog_t
Date: Thu, 3 Apr 2008 08:23:47 +1000 [thread overview]
Message-ID: <20080402222347.GK103491721@sgi.com> (raw)
In-Reply-To: <87myocek4o.fsf@basil.nowhere.org>
On Wed, Apr 02, 2008 at 10:28:07AM +0200, Andi Kleen wrote:
> David Chinner <dgc@sgi.com> writes:
> >
> > This just means that the start of the structure is cacheline
> > aligned. I don't think the internal alignment commands force the
> > entire structure to be cacheline aligned, merely pad the struture
> > internally. In that case, even though the specific internal parts of
> > the structure are on separate cache lines, there's no guarantee that
> > all the related members are on the same cacheline. Hence I'm
> > explicitly stating the exact alignment I want for the structure....
>
> Isn't the structure dynamically allocated anyways?
> The full type alignment really only matters for statics/globals
> where the linker can handle it.
Ah, right you are. My bad.
> For the dynamic allocation you would rather need to make sure it
> starts at a cache line boundary explicitely because the allocator doesn't
> know the alignment of the target type, otherwise your careful
> padding might be useless.
Yup. Is there an allocator function gives us cacheline aligned
allocation (apart from a slab initialised with SLAB_HWCACHE_ALIGN)?
There isn't one, right?
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next prev parent reply other threads:[~2008-04-02 22:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 23:15 [Patch] Cacheline align xlog_t David Chinner
2008-04-02 6:35 ` Lachlan McIlroy
2008-04-02 5:44 ` David Chinner
2008-04-02 8:28 ` Andi Kleen
2008-04-02 22:23 ` David Chinner [this message]
2008-04-03 6:46 ` Andi Kleen
2008-04-04 1:02 ` Timothy Shimmin
2008-04-04 1:18 ` David Chinner
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=20080402222347.GK103491721@sgi.com \
--to=dgc@sgi.com \
--cc=andi@firstfloor.org \
--cc=lachlan@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.com \
/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.