mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Paul Jackson <pj@sgi.com>
Cc: Simon.Derr@bull.net, linux-kernel@vger.kernel.org,
	nickpiggin@yahoo.com.au, ak@suse.de, pj@sgi.com,
	haveblue@us.ibm.com, mingo@elte.hu, clameter@sgi.com
Subject: Re: [PATCH] Cpuset: alloc_pages_node overrides cpuset constraints
Date: Sun, 19 Mar 2006 23:07:12 -0800	[thread overview]
Message-ID: <20060319230712.5b15ee3e.akpm@osdl.org> (raw)
In-Reply-To: <20060318204027.13217.34767.sendpatchset@sam.engr.sgi.com>

Paul Jackson <pj@sgi.com> wrote:
>
> @@ -113,6 +114,11 @@ static inline struct page *alloc_pages_n
>   	/* Unknown node is current node */
>   	if (nid < 0)
>   		nid = numa_node_id();
>  +	/*
>  +	 * Specified (or implied by nid < 0) node overrides cpuset placement.
>  +	 * Various slab, page and device node specific allocations need this.
>  +	 */
>  +	gfp_mask |= __GFP_NOCPUSET;

You're kidding.  This adds more code to every page allocation on every
machine, cpusets or not.

I stuck this on top:

--- devel/include/linux/gfp.h~cpuset-alloc_pages_node-overrides-cpuset-constraints-speedup	2006-03-19 23:01:04.000000000 -0800
+++ devel-akpm/include/linux/gfp.h	2006-03-19 23:01:04.000000000 -0800
@@ -47,7 +47,11 @@ struct vm_area_struct;
 #define __GFP_ZERO	((__force gfp_t)0x8000u)/* Return zeroed page on success */
 #define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */
 #define __GFP_HARDWALL   ((__force gfp_t)0x20000u) /* Enforce hardwall cpuset memory allocs */
+#ifdef CONFIG_CPUSETS
 #define __GFP_NOCPUSET	((__force gfp_t)0x40000u)/* Ignore cpuset constraints */
+#else
+#define __GFP_NOCPUSET	((__force gfp_t)0u)
+#endif
 
 #define __GFP_BITS_SHIFT 20	/* Room for 20 __GFP_FOO bits */
 #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
_

But it's a bit ugly.

  reply	other threads:[~2006-03-20  7:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-18 20:40 Paul Jackson
2006-03-20  7:07 ` Andrew Morton [this message]
2006-03-20  8:30   ` Paul Jackson
2006-03-20 15:34     ` Christoph Lameter
2006-03-22 16:33 ` Andi Kleen
2006-03-22 18:05   ` Paul Jackson

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=20060319230712.5b15ee3e.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=Simon.Derr@bull.net \
    --cc=ak@suse.de \
    --cc=clameter@sgi.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pj@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

Powered by JetHome