[openib-general] Re: page allocation failure with kdapl/mthca

Roland Dreier roland at topspin.com
Thu Jun 23 08:51:46 PDT 2005


    Roland> I just checked in a change that converts from using
    Roland> pci_alloc_consistent(), which is always GFP_ATOMIC, to
    Roland> dma_alloc_coherent(..., GFP_KERNEL).

    Grant> This arch specific.

    Grant> On ia64 I expect both functions to land in the same bit of
    Grant> code.  For ZX1 platforms, that is sba_alloc_coherent().
    Grant> See arch/ia64/hp/common/sba_iommu.c since the behavior is
    Grant> different depending on CONFIG_NUMA setting.

Sure, but follow the code all the way through.  ia64 uses
<asm-generic/pci-dma-compat.h>, which defines pci_alloc_consistent()
to be dma_alloc_coherent(..., GFP_ATOMIC).  You're right that both
will end up in sba_alloc_coherent(), but the difference is the flags
parameter.  GFP_ATOMIC allocations can easily fail even when the
system has plenty of pages available for GFP_KERNEL allocations.

 - R.



More information about the general mailing list