[lkml]   [2006]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 4/5] cpuset memory spread slab cache optimizations
Paul Jackson <> wrote:
> +void mpol_set_task_struct_flag(struct task_struct *p)
> +{
> + if (p->mempolicy)
> + p->flags |= PF_MEMPOLICY;
> + else
> + p->flags &= ~PF_MEMPOLICY;
> +}

As mentioned before, if we ever modify tsk->flags, where tsk != current, we
have a nasty race. So this function's interface really does invite that
race and hence is not very good.

As we do seem to be only calling it for current or for a newly-created task
I guess the access is OK, so perhaps a weaselly comment would cover that

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-02-05 00:54    [W:0.099 / U:1.444 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site