mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nitin Gupta <nitingupta910@gmail.com>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3]: xvmalloc memory allocator
Date: Tue, 17 Mar 2009 23:25:33 +0530	[thread overview]
Message-ID: <49BFE415.8020803@vflare.org> (raw)
In-Reply-To: <alpine.DEB.1.10.0903171237180.21582@qirst.com>

(sending again since it was blocked by lkml last time. Sorry Christoph for duplicate email).

Christoph Lameter wrote:
> On Tue, 17 Mar 2009, Nitin Gupta wrote:
> 
>> Slub allocator could not be used due to fragmentation issues:
>> http://code.google.com/p/compcache/wiki/AllocatorsComparison
>> Data here shows kmalloc using ~43% more memory than TLSF and xvMalloc
>> is showed ~2% more space efficiency than TLSF (due to smaller metadata).
> 
> Well this looks like the use of 2^n sizes of the kmalloc arrayse cause a
> lot of wastage here. Creating slab caches that fit your needs may help?

Creating slabs for sizes in range, say, [32, 3/4*PAGE_SIZE] separated by 64bytes
will require 48 slabs! Then for slab of each size class will have wastage due to
unused slab objects in each class.
Larger difference in slab sizes (and thus small no. of them), will surely cause too much
wastage due to internal fragmentation.

Another (more important) point to consider is that, use of slabs will eat-up vmalloc
area to keep slab memory backed by VA space. On 32-bit systems, vmalloc area
is small and limits amount of memory that can be allocated for compressed pages.
With xvmalloc we map/unmap pages on demand thus removing dependence on
vmalloc VA area.

 > Have you had a look at the SLOB approach?
 >

Nope. I will see how this may help.

Thanks,
Nitin


  reply	other threads:[~2009-03-17 17:56 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17 11:34 [PATCH 0/3]: compressed in-memory swapping Nitin Gupta
2009-03-17 11:36 ` [PATCH 1/3]: compressed RAM block device Nitin Gupta
2009-03-18 12:25   ` Nick Piggin
2009-03-18 12:38     ` Nitin Gupta
2009-03-18 12:49       ` Nick Piggin
2009-03-20 18:56   ` Pavel Machek
2009-03-20 19:53     ` 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 [this message]
     [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
2009-03-17 11:38 ` [PATCH 3/3]: documentation Nitin Gupta
2009-03-17 23:34 ` [PATCH 0/3]: compressed in-memory swapping Russ Dill
2009-03-20 14:07 [PATCH 0/3] compressed in-memory swapping take2 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

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=49BFE415.8020803@vflare.org \
    --to=nitingupta910@gmail.com \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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