lkml.org 
[lkml]   [2008]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 3/4] mempolicy: add MPOL_F_STATIC_NODES flag
    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?

    David


    \
     
     \ /
      Last update: 2008-02-13 06:09    [W:4.219 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site