On Tue, 2008-02-12 at 21:06 -0800, David Rientjes wrote:
quoted text > On Tue, 12 Feb 2008, David Rientjes wrote:
>
> > Since we're allowed to remap the node to a different node than the user
> > specified with either syscall, the current behavior is that "one node is
> > as good as another." In other words, we're trying to accomodate the mode
> > first by setting pol->v.preferred_node to some accessible node and only
> > setting that to the user-supplied node if it is available.
> >
> > If the node isn't available and the user specifically asked that it is not
> > remapped (with MPOL_F_STATIC_NODES), then I felt local allocation was best
> > compared to remapping to a node that may be unrelated to the VMA or task.
> > This preserves a sense of the current behavior that "one node is as good
> > as another," but the user specifically asked for no remap.
> >
>
> Upon further inspection, perhaps it's better to fallback to local
> allocation when the preferred node is not available on rebind and then, if
> it becomes available later, prefer it again.
>
> In mpol_rebind_policy():
>
> case MPOL_PREFERRED:
> if (!remap) {
> int nid = first_node(pol->user_nodemask);
>
> if (node_isset(nid, *newmask))
> pol->v.preferred_node = nid;
> else {
> /*
> * Fallback to local allocation since that
> * is the behavior in mpol_new(). The
> * node may eventually become available.
> */
> pol->v.preferred_node = -1;
> }
> } else
> pol->v.preferred_node = node_remap(pol->v.preferred_node,
> *mpolmask, *newmask);
> break;
>
> What do you think, Lee?
I agree. I was still puzzled by your patch in this area as it appeared
to me that you weren't remapping back to your original preferred node,
which seemed to be the whole point of "static". I was going to ask
about this today, but you caught it first!
Lee
quoted text >
> David
--
unsubscribe notice 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/
Messages in current thread:
Re: [patch 3/4] mempolicy: add MPOL_F_STATIC_NODES flag , Lee Schermerhorn , (Wed Feb 13, 11:15 am)