[lkml]   [2009]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/3] xvmalloc memory allocator
Pekka Enberg wrote:
> On Sat, Mar 21, 2009 at 2:24 PM, Andrew Morton
> <> wrote:
>> I assumed that you were referring to moving xvmalloc() down into
>> drivers/block. That would be bad, because then xvmalloc() will _never_ be
>> usable by anything other than ramzblock <new name!>?
> Who is going to use it? The only reason compcache needs something
> special is because it wants to take advantage of GFP_HIGHMEM pages.
> Are there other subsystems that need this capability as well?

As I mentioned earlier, highmem is not the only advantage. Don't forget
O(1) alloc/free and low fragmentation. Sometime in next week, I will post
additional numbers comparing SLUB and xvmalloc.

One point I noted in SLUB is that, it needs to allocate higher order pages
to minimize space wastage at end of every page. For in-memory swap compression,
we simply cannot allocate higher order pages since its going to used under
memory crunch (its a swap device!) and we cannot hope to find lot of higher
order pages under such conditions. If we enforce it to use 0-order pages
then we cannot allocate > 2048b since all such allocations will end-up
using entire page!
Also, if we decide to use SLUB for objects of size < 2048b only then how will
we store bigger objects provided we can only use 0-order pages?
(we need storage for range, say, [32, 3/4*PAGE_SIZE]).


 \ /
  Last update: 2009-03-21 18:39    [W:0.037 / U:3.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site