[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <522C1DF17AF50042AD8AE87F7887BD3D0163549554@exch.hq.tensilica.com>
Date: Tue, 11 May 2010 19:07:35 -0700
From: Marc Gauthier <marc@...silica.com>
To: Mike Frysinger <vapier.adi@...il.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
CC: Johannes Weiner <jw@...ix.com>, Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...helsinki.fi>,
Matt Mackall <mpm@...enic.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Oskar Schirmer <os@...ix.com>,
Michael Hennerich <Michael.Hennerich@...log.com>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Daniel Glöckner <dg@...ix.com>,
Oliver Schneidewind <osw@...ix.com>,
Nick Piggin <npiggin@...e.de>,
David Rientjes <rientjes@...gle.com>,
David Brownell <dbrownell@...rs.sourceforge.net>,
Grant Likely <grant.likely@...retlab.ca>,
Chris Zankel <chris@...kel.net>,
Piet Delaney <Piet.Delaney@...silica.com>
Subject: RE: [LKML] Re: [PATCH v3] ad7877: keep dma rx buffers in seperate
cache lines
Mike Frysinger wrote:
> lets look at the cacheline sizes for arches that dont set
> ARCH_KMALLOC_MINALIGN to L1_CACHE_BYTES:
> - alplha - 32 or 64
> - frv - 32 or 64
> - blackfin - 32
> - parisc - 32 or 64
> - mn10300 - 16
> - s390 - 256
> - score - 16
> - sparc - 32
> - xtensa - 16 or 32
>
> assuming alpha and s390 handle cache coherency in hardware, it looks
> to me like the proposed assumption (kmalloc returns cachealigned
> pointers when cache management is in software) does not hold true.
>
> so should these other arches also be setting ARCH_KMALLOC_MINALIGN to
> L1_CACHE_BYTES ?
IMHO, yes. It just makes sense to avoid false-sharing issues, not to
allocate unrelated blocks in the same cache line.
Also as it turns out (hope he doesn't me telling), Christian Zankel
recently found a bug that was fixed exactly that way, by setting
ARCH_KMALLOC_MINALIGN to L1_CACHE_BYTES for the Xtensa architecture.
(Too recent to have percolated to mainline.)
A lot of the above might be cache line aligned (?).
-Marc
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists