LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, rientjes@google.com, nacc@us.ibm.com,
	kamezawa.hiroyu@jp.fujitsu.com, clameter@sgi.com
Subject: Re: [PATCH 4/6] Have zonelist contains structs with both a zone pointer and zone_idx
Date: Tue, 20 Nov 2007 10:34:53 -0500	[thread overview]
Message-ID: <1195572894.5041.19.camel@localhost> (raw)
In-Reply-To: <20071109143346.23540.69776.sendpatchset@skynet.skynet.ie>

On Fri, 2007-11-09 at 14:33 +0000, Mel Gorman wrote:
> Filtering zonelists requires very frequent use of zone_idx(). This is costly
> as it involves a lookup of another structure and a substraction operation. As
> the zone_idx is often required, it should be quickly accessible.  The node
> idx could also be stored here if it was found that accessing zone->node is
> significant which may be the case on workloads where nodemasks are heavily
> used.
> 
> This patch introduces a struct zoneref to store a zone pointer and a zone
> index.  The zonelist then consists of an array of this struct zonerefs which
> are looked up as necessary. Helpers are given for accessing the zone index
> as well as the node index.
> 
> [kamezawa.hiroyu@jp.fujitsu.com: Suggested struct zoneref instead of embedding information in pointers]
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>
> Acked-by: Christoph Lameter <clameter@sgi.com>
> Acked-by: David Rientjes <rientjes@google.com>
> ---
> 
>  arch/parisc/mm/init.c  |    2 -
>  fs/buffer.c            |    6 ++--
>  include/linux/mmzone.h |   64 +++++++++++++++++++++++++++++++++++++-------
>  include/linux/oom.h    |    4 +-
>  kernel/cpuset.c        |    4 +-
>  mm/hugetlb.c           |    3 +-
>  mm/mempolicy.c         |   35 ++++++++++++++----------
>  mm/oom_kill.c          |   45 +++++++++++++++---------------
>  mm/page_alloc.c        |   59 ++++++++++++++++++++--------------------
>  mm/slab.c              |    2 -
>  mm/slub.c              |    2 -
>  mm/vmscan.c            |    7 ++--
>  mm/vmstat.c            |    5 ++-
>  13 files changed, 145 insertions(+), 93 deletions(-)
> 
<snip>
> diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.24-rc1-mm-010_use_two_zonelists/kernel/cpuset.c linux-2.6.24-rc1-mm-020_zoneid_zonelist/kernel/cpuset.c
> --- linux-2.6.24-rc1-mm-010_use_two_zonelists/kernel/cpuset.c	2007-10-24 04:50:57.000000000 +0100
> +++ linux-2.6.24-rc1-mm-020_zoneid_zonelist/kernel/cpuset.c	2007-11-08 19:18:27.000000000 +0000
> @@ -1877,8 +1877,8 @@ int cpuset_zonelist_valid_mems_allowed(s
>  {
>  	int i;
>  
> -	for (i = 0; zl->zones[i]; i++) {
> -		int nid = zone_to_nid(zl->zones[i]);
> +	for (i = 0; zl->_zonerefs[i].zone; i++) {
> +		int nid = zonelist_node_idx(zl->_zonerefs[i]);

Should be:
 +		  int nid = zonelist_node_idx(&zl->_zonerefs[i]);
                                              ^
else doesn't build.  Stand by for testing...

>  
>  		if (node_isset(nid, current->mems_allowed))
>  			return 1;
<snip>


  reply	other threads:[~2007-11-20 15:46 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 14:32 [PATCH 0/6] Use one zonelist per node instead of multiple zonelists v9 Mel Gorman
2007-11-09 14:32 ` [PATCH 1/6] Use zonelists instead of zones when direct reclaiming pages Mel Gorman
2007-11-09 14:33 ` [PATCH 2/6] Introduce node_zonelist() for accessing the zonelist for a GFP mask Mel Gorman
2007-11-09 15:31   ` Christoph Lameter
2007-11-09 14:33 ` [PATCH 3/6] Use two zonelist that are filtered by " Mel Gorman
2007-11-09 14:33 ` [PATCH 4/6] Have zonelist contains structs with both a zone pointer and zone_idx Mel Gorman
2007-11-20 15:34   ` Lee Schermerhorn [this message]
2007-11-09 14:34 ` [PATCH 5/6] Filter based on a nodemask as well as a gfp_mask Mel Gorman
2008-02-29  5:01   ` Paul Jackson
2008-02-29 14:49     ` Lee Schermerhorn
2008-03-04 20:20     ` [PATCH] 2.6.25-rc3-mm1 - Mempolicy - update stale documentation and comments Lee Schermerhorn
2008-03-05  0:35       ` Paul Jackson
2008-03-07 11:53       ` Mel Gorman
2007-11-09 14:34 ` [PATCH 6/6] Use one zonelist that is filtered by nodemask Mel Gorman
2007-11-09 15:45   ` Christoph Lameter
2007-11-09 16:14     ` Mel Gorman
2007-11-09 16:19       ` Christoph Lameter
2007-11-09 16:45       ` Nishanth Aravamudan
2007-11-09 17:18         ` Lee Schermerhorn
2007-11-09 17:26           ` Christoph Lameter
2007-11-09 18:16             ` Nishanth Aravamudan
2007-11-09 18:20               ` Nishanth Aravamudan
2007-11-09 18:22                 ` Christoph Lameter
2007-11-11 14:16             ` Mel Gorman
2007-11-12 19:07               ` Christoph Lameter
2007-11-09 18:14           ` Nishanth Aravamudan
2007-11-20 14:19     ` Mel Gorman
2007-11-20 15:14       ` Lee Schermerhorn
2007-11-20 16:21         ` Mel Gorman
2007-11-20 20:19           ` Christoph Lameter
2007-11-20 20:18       ` Christoph Lameter
2007-11-20 21:26         ` Mel Gorman
2007-11-20 21:33         ` Andrew Morton
2007-11-20 21:38           ` Christoph Lameter
  -- strict thread matches above, loose matches on Subject: below --
2007-09-28 14:23 [PATCH 0/6] Use one zonelist per node instead of multiple zonelists v8 Mel Gorman
2007-09-28 14:24 ` [PATCH 4/6] Have zonelist contains structs with both a zone pointer and zone_idx Mel Gorman
2007-10-17  3:22   ` David Rientjes
2007-09-13 17:52 [PATCH 0/6] Use one zonelist per node instead of multiple zonelists v7 Mel Gorman
2007-09-13 17:53 ` [PATCH 4/6] Have zonelist contains structs with both a zone pointer and zone_idx Mel Gorman
2007-09-12 21:04 [PATCH 0/6] Use one zonelist per node instead of multiple zonelists v6 Mel Gorman
2007-09-12 21:06 ` [PATCH 4/6] Have zonelist contains structs with both a zone pointer and zone_idx Mel Gorman
2007-09-12 21:17   ` 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=1195572894.5041.19.camel@localhost \
    --to=lee.schermerhorn@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=nacc@us.ibm.com \
    --cc=rientjes@google.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).