lkml.org 
[lkml]   [2007]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Intel-IOMMU 02/10] Library routine for pre-allocat pool handling
Andrew Morton wrote:
>> Where as resource pool is exactly opposite of mempool, where each
>> time it looks for an object in the pool and if it exist then we
>> return that object else we try to get the memory for OS while
>> scheduling the work to grow the pool objects. In fact, the work
>> is schedule to grow the pool when the low threshold point is hit.
>
> I realise all that. But I'd have thought that the mempool approach is
> actually better: use the page allocator and only deplete your reserve pool
> when the page allocator fails.

the problem with that is that if anything downstream from the iommu
layer ALSO needs memory, we've now eaten up the last free page and
things go splat.

in terms of deadlock avoidance... I wonder if we need something
similar to the swap token; once a process dips into the emergency
pool, it becomes the only one that gets to use this pool, so that it's
entire chain of allocations will succeed, rather than each process
only getting halfway through...

But yeah it's minute details and you can argue either way is the right
approach.

You can even argue for the old highmem.c approach; go into half the
pool before going to the VM, then to kmalloc() and if that fails dip
into the second half of the pool.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-12 03:15    [W:0.091 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site