lkml.org 
[lkml]   [2006]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpuset - rework cpuset_zone_allowed api
On 12/8/06, Paul Jackson <pj@sgi.com> wrote:
>
> -int __cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
> +int __cpuset_zone_allowed_softwall(struct zone *z, gfp_t gfp_mask)
> {
> int node; /* node that zone z is on */
> const struct cpuset *cs; /* current cpuset ancestors */
> @@ -2335,6 +2351,40 @@ int __cpuset_zone_allowed(struct zone *z
> return allowed;
> }

While you're changing this, is there a good reason not to check
is_mem_exclusive() *before* taking callback_mutex and calling
nearest_exclusive_ancestor()?

something like:

rcu_read_lock();
exc = is_mem_exclusive(rcu_dereference(current->cs));
rcu_read_unlock();
if (exc)
return 1;

... take callback_mutex, etc ...

Paul
-
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-12-08 17:53    [W:0.344 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site