From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [RFC PATCH 0/5] futex: introduce an optimistic spinning futex Date: Mon, 21 Jul 2014 09:45:55 -0700 Message-ID: <871tte3bjw.fsf@tassilo.jf.intel.com> References: <1405956271-34339-1-git-send-email-Waiman.Long@hp.com> <8761iq3bp3.fsf@tassilo.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <8761iq3bp3.fsf@tassilo.jf.intel.com> (Andi Kleen's message of "Mon, 21 Jul 2014 09:42:48 -0700") Sender: linux-kernel-owner@vger.kernel.org To: Waiman Long Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , Heiko Carstens , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, Jason Low , Scott J Norton List-Id: linux-api@vger.kernel.org Andi Kleen writes: > Waiman Long writes: > >> This patch series introduces two new futex command codes to support >> a new optimistic spinning futex for implementing an exclusive lock >> primitive that should perform better than the same primitive using >> the wait-wake futex in cases where the lock owner is actively working >> instead of waiting for I/O completion. > > How would you distinguish those two cases automatically? Also BTW traditionally the spinning was just done in user space. This would be always even more efficient, because it would even avoid the syscall entry path. Given the glibc adaptive mutexes are not very good, but I'm sure those could be improved. -Andi -- ak@linux.intel.com -- Speaking for myself only