[PATCH] pci_alloc_consistent memory conservation

Anton Blanchard anton at samba.org
Thu Nov 6 03:34:58 EST 2003


Hi Brian,

> Currently pci_alloc_consistent calls __get_free_pages to allocate
> memory. This results in a lot of wasted memory if people call
> pci_alloc_consistent a lot for odd sized allocations (which is what I
> wanted to do). The attached patch changes pci_alloc_consistent to use
> kmalloc and pci_map_single to accomplish the same function, with the
> added benefit of kmalloc to reduce the amount of wasted memory.

Keep in mind we need to use an entire page of TCE space for each
allocation and TCE space is severely restricted by LPAR.

Check out the pci pool code in drivers/pci/pool.c, will that help
your problem?

Anton

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list