lkml.org 
[lkml]   [2008]   [Feb]   [12]   [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, Paul Jackson wrote:

    > > 1) we've discussed the issue of returning EINVAL for non-empty nodemasks
    > > with MPOL_DEFAULT. By removing this restriction, we run the risk of
    > > breaking applications if we should ever want to define a semantic to
    > > non-empty node mask for MPOL_DEFAULT.
    >
    > The bigger risk, in my view, is breaking some piece of existing user code.
    > Properly written user code wouldn't break, but that doesn't mean much.
    > Changes, even minor corner case changes, often break something, so should
    > not be done with out cause. Whether or not code cleanup in mempolicy.c is
    > sufficient cause here is not clear to me.
    >
    > Future room for growth doesn't mean so much for me here; if we close one
    > future alternative, we always have others, such as more mode flag bits.
    >

    I've redone my patchset based on the feedback that I've received, and in
    my latest revisions I folded the entire equivalent of mpol_check_policy()
    into mpol_new().

    Lee, you feel strongly that non-empty nodemasks passed with MPOL_DEFAULT
    should be considered invalid and rejected by the kernel, as the current
    implementation does. I've brought up a counter-argument based on the
    set_mempolicy() man page and the Linux documentation that don't specify
    anything about what the nodemask shall contain if it's not a NULL pointer.

    My position was to give the user the benefit of the doubt. Because Linux
    has been vague in specifying what the nodemask shall contain, that (to me)
    means that it can contain anything. It's undefined, in a standards sense.
    The only thing that we should look for is whether the user passed
    MPOL_DEFAULT as the first parameter and then we should effect that policy
    because it's clearly the intention.

    I don't think there's a super strong case for either behavior, and that's
    why I just folded the mpol_check_policy() logic straight into mpol_new().

    David


    \
     
     \ /
      Last update: 2008-02-13 05:07    [W:0.025 / U:30.056 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site