From: Nitin Gupta <nitingupta910@gmail.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Andrew Morton <akpm@linux-foundation.org>,
cl@linux-foundation.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] xvmalloc memory allocator
Date: Sat, 21 Mar 2009 23:06:13 +0530 [thread overview]
Message-ID: <49C5258D.4030900@vflare.org> (raw)
In-Reply-To: <84144f020903210921m7603b9bfwed948a016b2f9429@mail.gmail.com>
Pekka Enberg wrote:
> On Sat, Mar 21, 2009 at 2:24 PM, Andrew Morton
> <akpm@linux-foundation.org> 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]).
Nitin
next prev parent reply other threads:[~2009-03-21 17:37 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 14:07 [PATCH 0/3] compressed in-memory swapping take2 Nitin Gupta
2009-03-20 14:10 ` [PATCH 1/3] compressed RAM block device Nitin Gupta
2009-03-20 14:12 ` [PATCH 2/3] xvmalloc memory allocator Nitin Gupta
2009-03-20 14:57 ` Christoph Lameter
2009-03-20 16:24 ` Nitin Gupta
2009-03-20 17:40 ` Christoph Lameter
2009-03-20 19:01 ` Pekka Enberg
2009-03-20 19:43 ` Nitin Gupta
2009-03-21 10:21 ` Andrew Morton
2009-03-21 12:12 ` Nitin Gupta
2009-03-21 12:24 ` Andrew Morton
2009-03-21 13:14 ` Nitin Gupta
2009-03-21 16:21 ` Pekka Enberg
2009-03-21 17:36 ` Nitin Gupta [this message]
2009-03-20 14:14 ` [PATCH 3/3] compcache documentation Nitin Gupta
2009-03-21 10:26 ` Andrew Morton
2009-03-21 12:31 ` Nitin Gupta
2009-03-21 12:55 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2009-03-17 11:34 [PATCH 0/3]: compressed in-memory swapping Nitin Gupta
2009-03-17 11:37 ` [PATCH 2/3]: xvmalloc memory allocator Nitin Gupta
2009-03-17 16:41 ` Christoph Lameter
2009-03-17 17:55 ` Nitin Gupta
[not found] ` <d760cf2d0903171028o600dc94cn7a5238520d104455@mail.gmail.com>
2009-03-17 17:58 ` Christoph Lameter
2009-03-17 18:34 ` Pekka Enberg
2009-03-18 16:07 ` Nitin Gupta
2009-03-18 15:17 ` Nitin Gupta
2009-03-18 16:58 ` Christoph Lameter
2009-03-18 17:29 ` Nitin Gupta
2009-03-18 19:21 ` Pekka Enberg
2009-03-18 19:36 ` Nitin Gupta
2009-03-19 2:30 ` Nitin Gupta
2009-03-19 6:08 ` Pekka Enberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49C5258D.4030900@vflare.org \
--to=nitingupta910@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome