Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753251AbaGUVrX (ORCPT ); Mon, 21 Jul 2014 17:47:23 -0400 Received: from www.linutronix.de ([62.245.132.108]:33980 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753019AbaGUVrV (ORCPT ); Mon, 21 Jul 2014 17:47:21 -0400 Date: Mon, 21 Jul 2014 23:47:02 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: Peter Zijlstra , Darren Hart , Andi Kleen , Waiman Long , Ingo Molnar , Davidlohr Bueso , Heiko Carstens , "linux-kernel@vger.kernel.org" , Linux API , "linux-doc@vger.kernel.org" , Jason Low , Scott J Norton Subject: Re: [RFC PATCH 0/5] futex: introduce an optimistic spinning futex In-Reply-To: Message-ID: References: <1405956271-34339-1-git-send-email-Waiman.Long@hp.com> <8761iq3bp3.fsf@tassilo.jf.intel.com> <871tte3bjw.fsf@tassilo.jf.intel.com> <20140721212740.GS3935@laptop> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 Jul 2014, Andy Lutomirski wrote: > On Mon, Jul 21, 2014 at 2:27 PM, Peter Zijlstra wrote: > > All this is predicated on the fact that syscalls are 'expensive'. > > Weren't syscalls only 100s of cycles? All this bitmap mucking is far > > more expensive due to cacheline misses, which due to the size of the > > things is almost guaranteed. > > 120 - 300 cycles for me, unless tracing happens, and I'm working on > reducing the incidence of tracing. So it's a non issue indeed and definitely not worth the trouble of that extra storage, the scheduler overhead, etc. Summary: Once you can't take it atomically in user space, you've lost anyway. And we are better off to do the magic spinning in kernel where we have all the information accessible already. Thanks, tglx -- 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/