Re: [patch 05/15] Generic Mutex Subsystem, mutex-core.patch

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

 



* Oleg Nesterov <[email protected]> wrote:

> But why we can't add the waiter to ->wait_list _after_ xchg() ? What 
> makes the difference? Fastpath atomic op can happen before or after 
> xchg(), this is ok. Unlock path will look at ->wait_list only after 
> taking spinlock, at this time we already added this waiter to the 
> ->wait_list.
> 
> In other words: we are holding ->wait_lock, nobody can even look at 
> ->wait_list. We can add the waiter to ->wait_list before or after 
> atomic_xchg() - it does not matter.

hm, you are right - i've added this optimization.

	Ingo
-
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