lkml.org 
[lkml]   [2006]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 4/5] cpuset memory spread slab cache optimizations
    Andrew wrote:
    > perhaps a weaselly comment would cover that worry.

    Well ... the comment was there, but the problem with comments
    is no one reads them ;)

    + * The task struct 'p' should either be current or a newly
    + * forked child that is not visible on the task list yet.
    + */
    +
    +void mpol_set_task_struct_flag(struct task_struct *p)


    > this function's interface really does invite that
    > race and hence is not very good

    Agreed. I'm still scratching my head coming up with a better way.

    Hmmm ... except for the call from fork, all calls to this are from
    within mm/mempolicy.c. I could make the routine within mempolicy.c
    static, and provide an exported wrapper with a name like:

    mpol_fix_fork_child_flag()

    that wrapped it. With a name like that, there seems less risk of
    abusing this.

    Any other suggestions?

    --
    I won't rest till it's the best ...
    Programmer, Linux Scalability
    Paul Jackson <pj@sgi.com> 1.925.600.0401
    -
    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-02-05 04:20    [W:0.021 / U:156.972 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site