[Top] [All Lists]

Re: [Patch] Cacheline align xlog_t

To: David Chinner <dgc@xxxxxxx>
Subject: Re: [Patch] Cacheline align xlog_t
From: Andi Kleen <andi@xxxxxxxxxxxxxx>
Date: 02 Apr 2008 10:28:07 +0200
Cc: Lachlan McIlroy <lachlan@xxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20080402054403.GF103491721@sgi.com>
References: <20080401231552.GV103491721@sgi.com> <47F3293C.6090708@sgi.com> <20080402054403.GF103491721@sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
David Chinner <dgc@xxxxxxx> 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.


<Prev in Thread] Current Thread [Next in Thread>