linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jack Steiner <steiner@sgi.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	cl@linux-foundation.org, Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: [PATCH] - New round-robin rotor for SLAB allocations
Date: Fri, 30 Apr 2010 13:52:39 -0700	[thread overview]
Message-ID: <20100430135239.7782f6ba.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100426210041.GA6580@sgi.com>

On Mon, 26 Apr 2010 16:00:41 -0500
Jack Steiner <steiner@sgi.com> wrote:

> We have observed several workloads running on multi-node systems where
> memory is assigned unevenly across the nodes in the system. There are
> numerous reasons for this but one is the round-robin rotor in
> cpuset_mem_spread_node().
> 
> For example, a simple test that writes a multi-page file will allocate pages
> on nodes 0 2 4 6 ... Odd nodes are skipped.  (Sometimes it allocates on
> odd nodes & skips even nodes).
> 
> An example is shown below. The program "lfile" writes a file consisting of
> 10 pages. The program then mmaps the file & uses get_mempolicy(...,
> MPOL_F_NODE) to determine the nodes where the file pages were allocated.
> The output is shown below:
> 
> 	# ./lfile
> 	 allocated on nodes: 2 4 6 0 1 2 6 0 2
> 
> 
> 
> There is a single rotor that is used for allocating both file pages & slab
> pages.  Writing the file allocates both a data page & a slab page
> (buffer_head).  This advances the RR rotor 2 nodes for each page
> allocated.
> 
> A quick confirmation seems to confirm this is the cause of the uneven
> allocation:
> 
> 	# echo 0 >/dev/cpuset/memory_spread_slab
> 	# ./lfile
> 	 allocated on nodes: 6 7 8 9 0 1 2 3 4 5
> 
> 
> This patch introduces a second rotor that is used for slab allocations.
>
>  include/linux/cpuset.h |    6 ++++++
>  include/linux/sched.h  |    1 +
>  kernel/cpuset.c        |   20 ++++++++++++++++----
>  mm/slab.c              |    2 +-
>  4 files changed, 24 insertions(+), 5 deletions(-)

Why no update to slob and slub?

--
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:[~2010-04-30 20:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 21:00 [PATCH] - New round-robin rotor for SLAB allocations Jack Steiner
2010-04-27  1:48 ` Christoph Lameter
2010-04-30 20:52 ` Andrew Morton [this message]
2010-05-02  2: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=20100430135239.7782f6ba.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=steiner@sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).