> That would be true if the test were "if
> (list_empty(&pool->avail_page_list))". But it is testing the list
> pointers in the item rather than the list pointers in the pool. It may
> be a bit confusing if you have never seen that usage before, which is
> why I added a comment. Basically, if y
On 07/26/2018 03:37 PM, Andy Shevchenko wrote:
> On Thu, Jul 26, 2018 at 9:54 PM, Tony Battersby wrote:
>> dma_pool_alloc() scales poorly when allocating a large number of pages
>> because it does a linear scan of all previously-allocated pages before
>> allocating a new one. Improve its scalabil
On Thu, Jul 26, 2018 at 9:54 PM, Tony Battersby wrote:
> dma_pool_alloc() scales poorly when allocating a large number of pages
> because it does a linear scan of all previously-allocated pages before
> allocating a new one. Improve its scalability by maintaining a separate
> list of pages that h
dma_pool_alloc() scales poorly when allocating a large number of pages
because it does a linear scan of all previously-allocated pages before
allocating a new one. Improve its scalability by maintaining a separate
list of pages that have free blocks ready to (re)allocate. In big O
notation, this