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

Ingo Molnar
2008-09-10T12:19:07Z

* Joerg Roedel <joerg.roedel@amd.com> 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