[PATCH] pci_alloc_consistent memory conservation

Brian King brking at us.ibm.com
Thu Nov 6 06:42:32 EST 2003


>
>>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.

Good point. I didn't think about that.

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

I think it will. Thanks



--
Brian King
eServer Storage I/O
IBM Linux Technology Center


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





More information about the Linuxppc64-dev mailing list