Re: [1/3] Add 4GB DMA32 zone

Andi Kleen
2005-09-12T11:52:12Z

Thanks Mark for the corrections.

On Monday 12 September 2005 13:44, Salyzyn, Mark wrote:
> Andi Kleen writes:
> >> Adaptec AACRAID is one offender
> >
> > 4GB limit is really common and the oddballs like
> >these have to use the same workarounds (custom bounce buffer in low
>
> GFP_DMA
>
> >memory) they always did on machines with enough memory.
>
> The 2GB limit is to deal with allocation of hardware command frames
> (FIB) and thus only during initialization,
> all the adapters deliver DMA
> to the full address range at 'run time' and the driver does open the
> limit up at that point. The reason for this strangeness is the inability
> of the Firmware to work around the Intel ATU when doing memcpy, where
> the DMA engine had no such limits.

Ok that makes a lot of sense. You should probably be really using
pci_alloc_consistent() instead of GFP_DMA directly here, but other than
that it should just work.

(pci_alloc_consistent has some hacks to first try the higher zones
and only use the lower zones if the allocation didn't succeed here -
on a 2GB machine you have a 50% chance that a normal allocation
ends up below 1GB - which make this all a bit more reliable)

That probably explains the lack of reports about this issue
which I mistakenly assumed was because of the cards getting scarce.

Anyways, it shows the aacraid doesn't need GFP_DMA32 at all, which
is good.

I hope there are no other concerns about the patch and Linus
could just merge it now?

-Andi