[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070721123159.GB1769@elte.hu>
Date: Sat, 21 Jul 2007 14:31:59 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Oleg Nesterov <oleg@...sign.ru>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
Eric Dumazet <dada1@...mosbay.com>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ulrich Drepper <drepper@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pi-futex: set PF_EXITING without taking ->pi_lock
* Oleg Nesterov <oleg@...sign.ru> wrote:
> It is a bit annoying that do_exit() takes ->pi_lock to set PF_EXITING.
> All we need is to synchronize with lookup_pi_state() which saw this task
> without PF_EXITING under ->pi_lock.
>
> Change do_exit() to use spin_unlock_wait().
>
> Signed-off-by: Oleg Nesterov <oleg@...sign.ru>
Acked-by: Ingo Molnar <mingo@...e.hu>
> - spin_lock_irq(&tsk->pi_lock);
> - tsk->flags |= PF_EXITING;
> - spin_unlock_irq(&tsk->pi_lock);
> + smp_mb();
> + spin_unlock_wait(&tsk->pi_lock);
hm, isnt spin_unlock_wait() an SMP barrier in itself? (if not then it
should be.)
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists