From: FUJITA Tomonori on
On Wed, 19 May 2010 12:40:36 +0100
David Woodhouse <dwmw2(a)infradead.org> wrote:

> On Wed, 2010-05-19 at 13:32 +0200, Geert Uytterhoeven wrote:
> > Instead of having (different) defaults in sl[aou]b, perhaps we should
> > just remove the defaults completely, to ensure all architectures set
> > ARCH_SLAB_MINALIGN to the correct value?
>
> What is 'correct'? The architecture sets it to the minimum value that it
> can cope with, according to its own alignment constraints (and DMA/cache
> constraints, in the case of ARCH_KMALLOC_MINALIGN).

IIRC, not all the architectures do that; ARCH_KMALLOC_MINALIGN doesn't
mean "DMA-safe" alignment currently.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: David Woodhouse on
On Wed, 2010-05-19 at 21:02 +0900, FUJITA Tomonori wrote:
> On Wed, 19 May 2010 12:40:36 +0100
> David Woodhouse <dwmw2(a)infradead.org> wrote:
>
> > On Wed, 2010-05-19 at 13:32 +0200, Geert Uytterhoeven wrote:
> > > Instead of having (different) defaults in sl[aou]b, perhaps we should
> > > just remove the defaults completely, to ensure all architectures set
> > > ARCH_SLAB_MINALIGN to the correct value?
> >
> > What is 'correct'? The architecture sets it to the minimum value that it
> > can cope with, according to its own alignment constraints (and DMA/cache
> > constraints, in the case of ARCH_KMALLOC_MINALIGN).
>
> IIRC, not all the architectures do that; ARCH_KMALLOC_MINALIGN doesn't
> mean "DMA-safe" alignment currently.

Surely those architectures that have alignment constraints for DMA but
which don't set ARCH_KMALLOC_MINALIGN are just buggy -- it _does_ mean
that.

--
David Woodhouse Open Source Technology Centre
David.Woodhouse(a)intel.com Intel Corporation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: FUJITA Tomonori on
On Wed, 19 May 2010 13:19:45 +0100
David Woodhouse <dwmw2(a)infradead.org> wrote:

> On Wed, 2010-05-19 at 21:02 +0900, FUJITA Tomonori wrote:
> > On Wed, 19 May 2010 12:40:36 +0100
> > David Woodhouse <dwmw2(a)infradead.org> wrote:
> >
> > > On Wed, 2010-05-19 at 13:32 +0200, Geert Uytterhoeven wrote:
> > > > Instead of having (different) defaults in sl[aou]b, perhaps we should
> > > > just remove the defaults completely, to ensure all architectures set
> > > > ARCH_SLAB_MINALIGN to the correct value?
> > >
> > > What is 'correct'? The architecture sets it to the minimum value that it
> > > can cope with, according to its own alignment constraints (and DMA/cache
> > > constraints, in the case of ARCH_KMALLOC_MINALIGN).
> >
> > IIRC, not all the architectures do that; ARCH_KMALLOC_MINALIGN doesn't
> > mean "DMA-safe" alignment currently.
>
> Surely those architectures that have alignment constraints for DMA but
> which don't set ARCH_KMALLOC_MINALIGN are just buggy -- it _does_ mean
> that.

Well, I thought so but seems that there isn't such agreement:

http://kerneltrap.org/mailarchive/linux-kernel/2010/5/12/4568960

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: David Woodhouse on
On Wed, 2010-05-19 at 21:26 +0900, FUJITA Tomonori wrote:
>
> > Surely those architectures that have alignment constraints for DMA
> but
> > which don't set ARCH_KMALLOC_MINALIGN are just buggy -- it _does_
> mean
> > that.
>
> Well, I thought so but seems that there isn't such agreement:
>
> http://kerneltrap.org/mailarchive/linux-kernel/2010/5/12/4568960

How strange. That thread has a fair amount of misinformation from people
who should know better.

--
dwmw2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Pekka Enberg on
On Wed, May 19, 2010 at 2:46 PM, Herbert Xu <herbert(a)gondor.apana.org.au> wrote:
> On Wed, May 19, 2010 at 12:16:45PM +0100, David Woodhouse wrote:
>>
>> I don't mind. Feel free to apply them to slab.git, but be aware that
>> Herbert wanted to see a patch fixing sparc32 ARCH_SLAB_MINALIGN before
>> the crypto one is applied.
>>
>> Although arguably SLOB was broken on sparc32 even before the crypto
>> patch -- so perhaps that fix shouldn't _have_ to go in first?
>
> Well prior to this crypto on sparc32 did work with SLAB/SLUB. �If
> you change it without including the sparc pach, then sparc32 would
> be broken regardless of which allocator you used.

OK, I'll pick up David's patches and just wait for sparc changes to
hit Linus' tree first. Herbert, do I have your ACK for the crypto
patches?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/