All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>, Mel Gorman <mel@csn.ul.ie>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Nick Piggin <npiggin@suse.de>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Lin Ming <ming.m.lin@intel.com>,
	"Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
Subject: Re: [patch] SLQB slab allocator (try 2)
Date: Tue, 17 Feb 2009 19:11:57 +0100	[thread overview]
Message-ID: <20090217181157.GA2158@cmpxchg.org> (raw)
In-Reply-To: <alpine.DEB.1.10.0902171204070.15929@qirst.com>

On Tue, Feb 17, 2009 at 12:05:07PM -0500, Christoph Lameter wrote:
> Well yes you missed two locations (kmalloc_caches array has to be
> redimensioned) and I also was writing the same patch...
> 
> Here is mine:
> 
> Subject: SLUB: Do not pass 8k objects through to the page allocator
> 
> Increase the maximum object size in SLUB so that 8k objects are not
> passed through to the page allocator anymore. The network stack uses 8k
> objects for performance critical operations.
> 
> Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
> 
> Index: linux-2.6/include/linux/slub_def.h
> ===================================================================
> --- linux-2.6.orig/include/linux/slub_def.h	2009-02-17 10:45:51.000000000 -0600
> +++ linux-2.6/include/linux/slub_def.h	2009-02-17 11:06:53.000000000 -0600
> @@ -121,10 +121,21 @@
>  #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE)
> 
>  /*
> + * Maximum kmalloc object size handled by SLUB. Larger object allocations
> + * are passed through to the page allocator. The page allocator "fastpath"
> + * is relatively slow so we need this value sufficiently high so that
> + * performance critical objects are allocated through the SLUB fastpath.
> + *
> + * This should be dropped to PAGE_SIZE / 2 once the page allocator
> + * "fastpath" becomes competitive with the slab allocator fastpaths.
> + */
> +#define SLUB_MAX_SIZE (2 * PAGE_SIZE)

This relies on PAGE_SIZE being 4k.  If you want 8k, why don't you say
so?  Pekka did this explicitely.

	Hannes

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>, Mel Gorman <mel@csn.ul.ie>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Nick Piggin <npiggin@suse.de>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Lin Ming <ming.m.lin@intel.com>,
	"Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
Subject: Re: [patch] SLQB slab allocator (try 2)
Date: Tue, 17 Feb 2009 19:11:57 +0100	[thread overview]
Message-ID: <20090217181157.GA2158@cmpxchg.org> (raw)
In-Reply-To: <alpine.DEB.1.10.0902171204070.15929@qirst.com>

On Tue, Feb 17, 2009 at 12:05:07PM -0500, Christoph Lameter wrote:
> Well yes you missed two locations (kmalloc_caches array has to be
> redimensioned) and I also was writing the same patch...
> 
> Here is mine:
> 
> Subject: SLUB: Do not pass 8k objects through to the page allocator
> 
> Increase the maximum object size in SLUB so that 8k objects are not
> passed through to the page allocator anymore. The network stack uses 8k
> objects for performance critical operations.
> 
> Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
> 
> Index: linux-2.6/include/linux/slub_def.h
> ===================================================================
> --- linux-2.6.orig/include/linux/slub_def.h	2009-02-17 10:45:51.000000000 -0600
> +++ linux-2.6/include/linux/slub_def.h	2009-02-17 11:06:53.000000000 -0600
> @@ -121,10 +121,21 @@
>  #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE)
> 
>  /*
> + * Maximum kmalloc object size handled by SLUB. Larger object allocations
> + * are passed through to the page allocator. The page allocator "fastpath"
> + * is relatively slow so we need this value sufficiently high so that
> + * performance critical objects are allocated through the SLUB fastpath.
> + *
> + * This should be dropped to PAGE_SIZE / 2 once the page allocator
> + * "fastpath" becomes competitive with the slab allocator fastpaths.
> + */
> +#define SLUB_MAX_SIZE (2 * PAGE_SIZE)

This relies on PAGE_SIZE being 4k.  If you want 8k, why don't you say
so?  Pekka did this explicitely.

	Hannes

--
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>

  parent reply	other threads:[~2009-02-17 18:10 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 15:46 [patch] SLQB slab allocator (try 2) Nick Piggin
2009-01-23 15:46 ` Nick Piggin
2009-01-24  2:38 ` Zhang, Yanmin
2009-01-24  2:38   ` Zhang, Yanmin
2009-01-26  8:48 ` Pekka Enberg
2009-01-26  8:48   ` Pekka Enberg
2009-01-26  9:07   ` Peter Zijlstra
2009-01-26  9:07     ` Peter Zijlstra
2009-01-26  9:10     ` Peter Zijlstra
2009-01-26  9:10       ` Peter Zijlstra
2009-01-26 17:22     ` Christoph Lameter
2009-01-26 17:22       ` Christoph Lameter
2009-01-27  9:07       ` Peter Zijlstra
2009-01-27  9:07         ` Peter Zijlstra
2009-01-27 20:21         ` Christoph Lameter
2009-01-27 20:21           ` Christoph Lameter
2009-02-03  2:04           ` Nick Piggin
2009-02-03  2:04             ` Nick Piggin
2009-02-03 10:12   ` Mel Gorman
2009-02-03 10:12     ` Mel Gorman
2009-02-03 10:36     ` Nick Piggin
2009-02-03 10:36       ` Nick Piggin
2009-02-03 11:22       ` Mel Gorman
2009-02-03 11:22         ` Mel Gorman
2009-02-03 11:26         ` Mel Gorman
2009-02-03 11:26           ` Mel Gorman
2009-02-04  6:48         ` Nick Piggin
2009-02-04  6:48           ` Nick Piggin
2009-02-04 15:27           ` Mel Gorman
2009-02-04 15:27             ` Mel Gorman
2009-02-05  3:59             ` Nick Piggin
2009-02-05  3:59               ` Nick Piggin
2009-02-05 13:49               ` Mel Gorman
2009-02-05 13:49                 ` Mel Gorman
2009-02-16 18:42               ` Mel Gorman
2009-02-16 18:42                 ` Mel Gorman
2009-02-16 19:17                 ` Pekka Enberg
2009-02-16 19:17                   ` Pekka Enberg
2009-02-16 19:41                   ` Mel Gorman
2009-02-16 19:41                     ` Mel Gorman
2009-02-16 19:43                     ` Pekka Enberg
2009-02-16 19:43                       ` Pekka Enberg
2009-02-17  1:06                   ` Zhang, Yanmin
2009-02-17  1:06                     ` Zhang, Yanmin
2009-02-17 16:20                   ` Christoph Lameter
2009-02-17 16:20                     ` Christoph Lameter
2009-02-17 17:01                     ` Pekka Enberg
2009-02-17 17:01                       ` Pekka Enberg
2009-02-17 17:05                       ` Christoph Lameter
2009-02-17 17:05                         ` Christoph Lameter
2009-02-17 17:24                         ` Pekka Enberg
2009-02-17 17:24                           ` Pekka Enberg
2009-02-17 18:11                         ` Johannes Weiner [this message]
2009-02-17 18:11                           ` Johannes Weiner
2009-02-17 19:43                           ` Pekka Enberg
2009-02-17 19:43                             ` Pekka Enberg
2009-02-17 20:04                             ` Christoph Lameter
2009-02-17 20:04                               ` Christoph Lameter
2009-02-18  0:48                               ` KOSAKI Motohiro
2009-02-18  0:48                                 ` KOSAKI Motohiro
2009-02-18  8:09                                 ` Pekka Enberg
2009-02-18  8:09                                   ` Pekka Enberg
2009-02-19  0:05                                   ` KOSAKI Motohiro
2009-02-19  0:05                                     ` KOSAKI Motohiro
2009-02-19  9:16                                     ` Pekka Enberg
2009-02-19  9:16                                       ` Pekka Enberg
2009-02-19 12:51                                       ` KOSAKI Motohiro
2009-02-19 12:51                                         ` KOSAKI Motohiro
2009-02-19 13:15                                         ` Pekka Enberg
2009-02-19 13:15                                           ` Pekka Enberg
2009-02-19 13:49                                           ` KOSAKI Motohiro
2009-02-19 13:49                                             ` KOSAKI Motohiro
2009-02-19 14:19                                             ` Christoph Lameter
2009-02-19 14:19                                               ` Christoph Lameter
2009-02-18  1:05                         ` Zhang, Yanmin
2009-02-18  1:05                           ` Zhang, Yanmin
2009-02-18  7:48                           ` Pekka Enberg
2009-02-18  7:48                             ` Pekka Enberg
2009-02-18  8:43                             ` Zhang, Yanmin
2009-02-18  8:43                               ` Zhang, Yanmin
2009-02-18  9:01                               ` Pekka Enberg
2009-02-18  9:01                                 ` Pekka Enberg
2009-02-18  9:19                                 ` Zhang, Yanmin
2009-02-18  9:19                                   ` Zhang, Yanmin
2009-02-19  8:40                         ` Pekka Enberg
2009-02-19  8:40                           ` Pekka Enberg
2009-02-16 19:25                 ` Pekka Enberg
2009-02-16 19:25                   ` Pekka Enberg
2009-02-16 19:44                   ` Mel Gorman
2009-02-16 19:44                     ` Mel Gorman
2009-02-16 19:42                     ` Pekka Enberg
2009-02-16 19:42                       ` Pekka Enberg
2009-02-03 11:28       ` Mel Gorman
2009-02-03 11:28         ` Mel Gorman
2009-02-03 11:50         ` Nick Piggin
2009-02-03 11:50           ` Nick Piggin
2009-02-03 12:01           ` Mel Gorman
2009-02-03 12:01             ` Mel Gorman
2009-02-03 12:07             ` Nick Piggin
2009-02-03 12:07               ` Nick Piggin
2009-02-03 12:26               ` Mel Gorman
2009-02-03 12:26                 ` Mel Gorman
2009-02-04 15:49               ` Christoph Lameter
2009-02-04 15:49                 ` Christoph Lameter
2009-02-04 15:48           ` Christoph Lameter
2009-02-04 15:48             ` Christoph Lameter
2009-02-03 18:58     ` Pekka Enberg
2009-02-03 18:58       ` Pekka Enberg
2009-02-04 16:06       ` Christoph Lameter
2009-02-04 16:06         ` 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=20090217181157.GA2158@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=ming.m.lin@intel.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=npiggin@suse.de \
    --cc=penberg@cs.helsinki.fi \
    --cc=yanmin_zhang@linux.intel.com \
    /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.