Re: Is __dma_direct_alloc_pages broken on s390?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 18 Jul 2019 13:36:33 +0200
Heiko Carstens <heiko.carstens@xxxxxxxxxx> wrote:

> On Thu, Jul 18, 2019 at 09:17:00AM +0200, Petr Tesarik wrote:
> > Hi all,
> > 
> > while looking into DMA allocation, I noticed that
> > __dma_direct_optimal_gfp_mask() in kernel/dma/direct.c can probably be
> > improved. It uses GFP_DMA if dev->coherent_dma_mask is less than
> > DMA_BIT_MASK(ARCH_ZONE_DMA_BITS). There is no s390-specific definition
> > of ARCH_ZONE_DMA_BITS. The default is 24 bits, but the DMA zone on s390
> > is 31 bits. CCW subchannel devices set sch->dev.coherent_dma_mask to
> > DMA_BIT_MASK(31), which is greater than DMA_BIT_MASK(24), so buffers
> > are allocated from the Normal zone first.
> > 
> > Would it make sense to set ARCH_ZONE_BITS to 31 on s390, or did I miss
> > something?  
> 
> No, this seems to be broken. Halil, can you look into this and provide
> a patch?

I wondered why the kernel works OK on my system, and it is in fact not
so bad. If the first allocation fails, the kernel adds GFP_DMA and
retries, so this is not fatal, but with a proper definition of
ARCH_ZONE_DMA_BITS it should be possible to get success in the first
attempt already, let's do it.

Petr T

Attachment: pgptwSPUdHpCP.pgp
Description: Digitální podpis OpenPGP


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux