From: Richard Kennedy <richard@rsk.demon.co.uk>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: penberg@cs.helsinki.fi, linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH][RFC] slub: increasing order reduces memory usage of some key caches
Date: Thu, 17 Jul 2008 11:09:08 +0100 [thread overview]
Message-ID: <1216289348.3061.16.camel@castor.localdomain> (raw)
In-Reply-To: <487E1ACF.3030603@linux-foundation.org>
On Wed, 2008-07-16 at 10:59 -0500, Christoph Lameter wrote:
> Patch to do this the right way in slub:
>
> Index: linux-2.6/mm/slub.c
> ===================================================================
> --- linux-2.6.orig/mm/slub.c 2008-07-16 10:42:07.000000000 -0500
> +++ linux-2.6/mm/slub.c 2008-07-16 10:53:36.000000000 -0500
> @@ -1860,6 +1860,10 @@
>
> rem = slab_size % size;
>
> + /* Never waste more than half of the size of an object*/
> + if (rem > size / 2)
> + continue;
> +
> if (rem <= slab_size / fract_leftover)
> break;
Thanks, I'll give that a try.
Do we need to limit the number of times this applies though?
for example, 216 byte structures will give
order:objs/slab:waste
0 : 18 :208
1 : 37 :200
2 : 75 :184
3 : 151 :152
4 : 303 : 88
I'm not sure where the balance point between efficient memory usage &
fragmentation pressure lies, but my gut feeling is that order 4 is just
too big for a structure this small.
Richard
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-07-17 10:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 12:29 Richard Kennedy
2008-07-16 13:21 ` Christoph Lameter
2008-07-16 13:58 ` Richard Kennedy
2008-07-16 14:03 ` Christoph Lameter
2008-07-16 14:30 ` Richard Kennedy
2008-07-16 14:33 ` Vegard Nossum
2008-07-16 14:46 ` Christoph Lameter
2008-07-18 9:57 ` Richard Kennedy
2008-07-18 14:17 ` Christoph Lameter
2008-07-18 14:20 ` Christoph Lameter
2008-07-18 14:42 ` Richard Kennedy
2008-07-18 14:55 ` Christoph Lameter
2008-07-18 15:22 ` Richard Kennedy
2008-07-18 17:13 ` Christoph Lameter
2008-07-16 19:52 ` Mel Gorman
2008-07-17 9:48 ` Richard Kennedy
2008-07-16 15:52 ` Christoph Lameter
2008-07-16 15:59 ` Christoph Lameter
2008-07-17 10:09 ` Richard Kennedy [this message]
2008-07-17 16:56 ` Christoph Lameter
2008-07-18 10:17 ` Richard Kennedy
2008-07-18 14:21 ` Christoph Lameter
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=1216289348.3061.16.camel@castor.localdomain \
--to=richard@rsk.demon.co.uk \
--cc=cl@linux-foundation.org \
--cc=linux-mm@kvack.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