From: Andi Kleen <andi@firstfloor.org>
To: David Chinner <dgc@sgi.com>
Cc: 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: 02 Apr 2008 10:28:07 +0200 [thread overview]
Message-ID: <87myocek4o.fsf@basil.nowhere.org> (raw)
In-Reply-To: <20080402054403.GF103491721@sgi.com>
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.
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.
-Andi
next prev parent reply other threads:[~2008-04-02 8:28 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 [this message]
2008-04-02 22:23 ` David Chinner
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=87myocek4o.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=dgc@sgi.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox