All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Richard Kennedy <richard@rsk.demon.co.uk>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Jens Axboe <jens.axboe@oracle.com>, Nick Piggin <npiggin@suse.de>,
	"Theodore Ts'o" <tytso@mit.edu>
Subject: Re: [PATCH]  fs: buffer_head, remove kmem_cache constructor to reduce memory usage under slub
Date: Tue, 09 Feb 2010 11:48:20 -0500	[thread overview]
Message-ID: <4B7191D4.4000101@redhat.com> (raw)
In-Reply-To: <1265722191.4033.36.camel@localhost>

On 02/09/2010 08:29 AM, Richard Kennedy wrote:
> fs: Remove the buffer_head kmem_cache constructor to reduce memory usage
> under slub.
>
> When using slub, having a kmem_cache constructor forces slub to add a
> free pointer to the size of the cached object, which can have a
> significant impact to the number of small objects that can fit into a
> slab.
>
> As buffer_head is relatively small and we can have large numbers of
> them, removing the constructor is a definite win.
>
> On x86_64 removing the constructor gives me 39 objects/slab, 3 more than
> without the patch. And on x86_32 73 objects/slab, which is 9 more.
>
> As alloc_buffer_head() already initializes each new object there is very
> little difference in actual code run.
>
> Signed-off-by: Richard Kennedy<richard@rsk.demon.co.uk>

Reviewed-by: Rik van Riel <riel@redhat.com>

-- 
All rights reversed.

      parent reply	other threads:[~2010-02-09 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-09 13:29 [PATCH] fs: buffer_head, remove kmem_cache constructor to reduce memory usage under slub Richard Kennedy
2010-02-09 14:31 ` Nick Piggin
2010-02-09 16:48 ` Rik van Riel [this message]

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=4B7191D4.4000101@redhat.com \
    --to=riel@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.de \
    --cc=richard@rsk.demon.co.uk \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.