| To: | David Chinner <dgc@xxxxxxx> |
|---|---|
| Subject: | Re: [Patch] Cacheline align xlog_t |
| From: | Andi Kleen <andi@xxxxxxxxxxxxxx> |
| Date: | Thu, 3 Apr 2008 08:46:08 +0200 |
| Cc: | Andi Kleen <andi@xxxxxxxxxxxxxx>, Lachlan McIlroy <lachlan@xxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx> |
| In-reply-to: | <20080402222347.GK103491721@sgi.com> |
| References: | <20080401231552.GV103491721@sgi.com> <47F3293C.6090708@sgi.com> <20080402054403.GF103491721@sgi.com> <87myocek4o.fsf@basil.nowhere.org> <20080402222347.GK103491721@sgi.com> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.2.1i |
On Thu, Apr 03, 2008 at 08:23:47AM +1000, David Chinner wrote: > > 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 __get_free_pages() @) [ok not serious] > (apart from a slab initialised with SLAB_HWCACHE_ALIGN)? That too yes. > There isn't one, right? You can always align yourself with kmalloc (or any other arbitary size allocator) with the standard technique: get L1_CACHE_BYTES-1 or possibly better cache_line_size() - 1 bytes more and then align the pointer manually with ALIGN. Only tricky part is that you have to undo the alignment before freeing. -Andi |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 4/7] XFS: Return case-insensitive match for dentry cache, Stephen Rothwell |
|---|---|
| Next by Date: | Re: [PATCH 2/7] XFS: ASCII case-insensitive support, Christoph Hellwig |
| Previous by Thread: | Re: [Patch] Cacheline align xlog_t, David Chinner |
| Next by Thread: | Re: [Patch] Cacheline align xlog_t, Timothy Shimmin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |