Re: [PATCH] Cpuset: alloc_pages_node overrides cpuset constraints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 18 March 2006 21:40, Paul Jackson wrote:

> --- 2.6.16-rc6.orig/kernel/cpuset.c	2006-03-13 20:19:36.000000000 -0800
> +++ 2.6.16-rc6/kernel/cpuset.c	2006-03-17 21:52:18.000000000 -0800
> @@ -2164,6 +2164,8 @@ int __cpuset_zone_allowed(struct zone *z
>  	node = z->zone_pgdat->node_id;
>  	if (node_isset(node, current->mems_allowed))
>  		return 1;
> +	if (gfp_mask & __GFP_NOCPUSET)
> +		return 1;
>  	if (gfp_mask & __GFP_HARDWALL)	/* If hardwall request, stop here */
>  		return 0;

Faster would be if (gfp_mask & (__GFP_NOCPUSET|__GFP_HARDWALL)) { /* sort them out */ } 
That would only give a single test for the common case of no such flag set.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux