lkml.org 
[lkml]   [2011]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH] spinlock: Kill spin_unlock_wait()
    On 01/05, Peter Zijlstra wrote:
    >
    > On Tue, 2011-01-04 at 17:45 +1100, Nick Piggin wrote:
    > > So I agree, taking it out the back and shooting it in the head would make
    > > the world a better place.
    >
    > There appear to be only two callsites of said horror,

    Not sure I understand why spin_unlock_wait() is really awful, but OK.

    > --- a/kernel/exit.c
    > +++ b/kernel/exit.c
    > @@ -956,7 +956,8 @@ NORET_TYPE void do_exit(long code)
    > * an exiting task cleaning up the robust pi futexes.
    > */
    > smp_mb();
    > - raw_spin_unlock_wait(&tsk->pi_lock);
    > + raw_spin_lock_irq(&tsk->pi_lock);
    > + raw_spin_unlock_irq(&tsk->pi_lock);

    then you can kill smp_mb() above.

    Oleg.



    \
     
     \ /
      Last update: 2011-01-05 20:37    [from the cache]
    ©2003-2014 Jasper Spaans. Advertise on this site