Re: [RFC] Initial alpha-0 for new page allocator API

Andi Kleen
2006-09-22T20:02:41Z

On Friday 22 September 2006 22:10, Alan Cox wrote:
> Ar Gwe, 2006-09-22 am 21:10 +0200, ysgrifennodd Andi Kleen:
> > We already have that scheme. Any existing driver should be already converted
> > away from GFP_DMA towards dma_*/pci_*. dma_* knows all the magic
> > how to get memory for the various ranges. No need to mess up the
> > main allocator.
>
> Add an isa_device class and that'll fall into place nicely. isa_alloc_*
> will end up asking for 20bit DMA and it will work nicely.

The old school way is to pass NULL to pci_alloc_coherent()

> > that basically goes through the buddy lists freeing in >O(1)
> > and does some directed reclaim, but that would likely be a separate
> > path anyways and not need your new structure to impact the O(1)
> > allocator.
>
> Just search within the candidate 4MB (or whatever it is these days)
> chunks.
>

What chunks?

> Ok the examples I know about are
> - ESS Maestro series audio - PCI, common on 32bit boxes a few years ago,
> no longer shipped and unlikely to be met on 64bit. Also slow allocations
> is fine.

And is fine with 16MB anyways I think.

> - Some aacraid, mostly only for control structures. Those found on 64bit
> are probably fine with slow alloc.

That is the only case where there are rumours they are not fine with 16MB.

> - Broadcom stuff - not sure if 30 or 31bit, around today and on 64bit

b44 is 30bit. That's true. I even got one here.

But it doesn't count really because we can handle it fine with existing
16MB GFP_DMA

> - Floppy controller

That one only needs one page or so. In the worst case memory could be preallocated
in .bss for it.

-Andi