Re: [PATCH 4/5] cpuset memory spread slab cache optimizations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Jackson <[email protected]> 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
worry.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux