Re: [PATCH] x86: avoid unnecessary low zone allocation in AMDIOMMU's alloc_coherent

From: Ingo Molnar
Date: Wed Sep 10 2008 - 08:19:12 EST



* Joerg Roedel <joerg.roedel@xxxxxxx> wrote:

> > + get_device_resources(dev, &iommu, &domain, &devid);
> > +
> > + if (iommu && domain)
> > + flag &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
> > +
>
> These flags are already removed in the dma_alloc_coherent function
> which calls this one. Further I think in the case of a remapping IOMMU
> like this one we should avoid implementing any gfp hacks and just
> trust the caller.

or add a WARN_ON_ONCE() instead, to document and enforce that
assumption.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/