Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933109AbaGUQq6 (ORCPT ); Mon, 21 Jul 2014 12:46:58 -0400 Received: from mga11.intel.com ([192.55.52.93]:23782 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932543AbaGUQq4 (ORCPT ); Mon, 21 Jul 2014 12:46:56 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,702,1400050800"; d="scan'208";a="573162484" From: Andi Kleen 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 Subject: Re: [RFC PATCH 0/5] futex: introduce an optimistic spinning futex References: <1405956271-34339-1-git-send-email-Waiman.Long@hp.com> <8761iq3bp3.fsf@tassilo.jf.intel.com> Date: Mon, 21 Jul 2014 09:45:55 -0700 In-Reply-To: <8761iq3bp3.fsf@tassilo.jf.intel.com> (Andi Kleen's message of "Mon, 21 Jul 2014 09:42:48 -0700") Message-ID: <871tte3bjw.fsf@tassilo.jf.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/