All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Andi Kleen <ak@suse.de>
Cc: ak@suse.de, akpm@osdl.org, linux-kernel@vger.kernel.org,
	nickpiggin@yahoo.com.au, Simon.Derr@bull.net, clameter@sgi.com
Subject: Re: [PATCH] Cpuset: rcu optimization of page alloc hook
Date: Sun, 11 Dec 2005 22:50:27 -0800	[thread overview]
Message-ID: <20051211225027.dc0483b8.pj@sgi.com> (raw)
In-Reply-To: <20051212062141.GB11190@wotan.suse.de>

Andi wrote:
> No - i mean a quick check if the cpuset allows all nodes
> for memory allocation.

Good - I think I've already done what you're suggesting, then.

You comment would pertain to the cpuset_zone_allowed() call in
mm/page_alloc.c __alloc_pages(), not to the routine we are
discussing here - cpuset_update_task_memory_state().

There are two key cpuset hooks in the page allocation code path:
 1) cpuset_update_task_memory_state() - which transfers
	changes in the tasks cpuset (where we need locking
	to read) into the task->mems_allowed nodemask (where
	the task can look w/o locks).
 2) cpuset_zone_allowed() - which checks each zone examined
	in the page_alloc() loops to see if it is on an allowed
	node.

The first of these was the primary victim of my patches today,
reducing the cost using RCU, and just now removing the NULL
cpuset check that was only needed during init.

The first of these is called once each page allocation, from
a couple of spots in mm/mempolicy.c.  The second of these is
called from within (now beneath) __alloc_pages(), once each
zone that is considered for providing the requested pages.

==

The second of these was already short circuited, using inline
code as you recommend, in a patch a couple of days ago (I forgot
to cc you directly on the patch, so sent you a separate message
pointing to those patches).

For that one, see the number_of_cpusets global kernel counter, in the
*-mm patch:

  cpuset_number_of_cpusets_optimization

It enables short circuiting with inline code this other key routine
on the memory allocation path: cpuset_zone_allowed().

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

  reply	other threads:[~2005-12-12  6:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-11 23:31 [PATCH] Cpuset: rcu optimization of page alloc hook Paul Jackson
2005-12-12  3:29 ` Andi Kleen
2005-12-12  6:11   ` Paul Jackson
2005-12-12  6:21     ` Andi Kleen
2005-12-12  6:50       ` Paul Jackson [this message]
2005-12-12  8:49 ` Eric Dumazet
2005-12-12  8:54   ` Nick Piggin
2005-12-12  9:06     ` Eric Dumazet
2005-12-12  9:11     ` Andrew Morton
2005-12-12  9:38       ` Nick Piggin
2005-12-12 10:02   ` Paul Jackson
2005-12-12 10:12     ` Andrew Morton
2005-12-13 15:53       ` Paul Jackson
2005-12-13 16:31         ` Eric Dumazet
2005-12-13 17:42           ` Christoph Lameter
2005-12-13 17:56             ` Eric Dumazet
2005-12-13 18:07               ` Christoph Lameter
2005-12-13 21:03               ` Paul Jackson
2005-12-13 21:16                 ` Christoph Lameter
2005-12-13 21:38                 ` Eric Dumazet
2005-12-13 22:23                   ` Paul Jackson
2005-12-13 22:29                     ` Christoph Lameter
2005-12-14  3:54                     ` Paul Jackson
2005-12-14  4:02                       ` Andi Kleen
2005-12-14  4:06                         ` Paul Jackson
2005-12-14  8:06                     ` Eric Dumazet
2005-12-14  8:40                       ` Paul Jackson
2005-12-13 20:08           ` Paul Jackson
2005-12-13 20:29             ` Eric Dumazet
2005-12-13 22:35               ` Paul Jackson
2005-12-13 21:44           ` Paul Jackson
2005-12-13 17:37         ` 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=20051211225027.dc0483b8.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=Simon.Derr@bull.net \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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.