lkml.org 
[lkml]   [2006]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] Cpuset: alloc_pages_node overrides cpuset constraints
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-20 08:13    [W:0.105 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site