Re: [PATCH -mm] cpuset,mm: fix no node to alloc memory when changingcpuset's mems - fix2
From: Miao Xie
Date: Wed May 12 2010 - 04:59:30 EST
on 2010-5-12 12:32, Andrew Morton wrote:
> On Wed, 12 May 2010 15:20:51 +0800 Miao Xie <miaox@xxxxxxxxxxxxxx> wrote:
>
>> @@ -985,6 +984,7 @@ repeat:
>> * for the read-side.
>> */
>> while (ACCESS_ONCE(tsk->mems_allowed_change_disable)) {
>> + task_unlock(tsk);
>> if (!task_curr(tsk))
>> yield();
>> goto repeat;
>
> Oh, I meant to mention that. No yield()s, please. Their duration is
> highly unpredictable. Can we do something more deterministic here?
Maybe we can use wait_for_completion().
>
> Did you consider doing all this with locking? get_mems_allowed() does
> mutex_lock(current->lock)?
do you means using a real lock(such as: mutex) to protect mempolicy and mem_allowed?
It may cause the performance regression, so I do my best to abstain from using a real
lock.
Thanks
Miao
>
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/