Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752314AbaGVCbU (ORCPT ); Mon, 21 Jul 2014 22:31:20 -0400 Received: from mail-we0-f171.google.com ([74.125.82.171]:44162 "EHLO mail-we0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751328AbaGVCbS (ORCPT ); Mon, 21 Jul 2014 22:31:18 -0400 Message-ID: <1405996274.5177.25.camel@marge.simpson.net> Subject: Re: [RFC PATCH 0/5] futex: introduce an optimistic spinning futex From: Mike Galbraith To: Steven Rostedt Cc: Thomas Gleixner , Darren Hart , Andy Lutomirski , Peter Zijlstra , 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 , Robert Haas Date: Tue, 22 Jul 2014 04:31:14 +0200 In-Reply-To: <20140721213457.46623e2f@gandalf.local.home> 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> <20140721213457.46623e2f@gandalf.local.home> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2014-07-21 at 21:34 -0400, Steven Rostedt wrote: > I was telling Robert that if futexes get optimistic spinning, he should > reconsider their use of userspace spinlocks in favor of this, because > I'm pretty sure that they will see a great improvement. My (dated) experience with pgsql says you're likely right. Once upon a time, preempting a userspace spinlock owner caused pgsql to collapse into a quivering heap. The scheduler trying to hand the CPU back to a preempted task instead of selecting what was strictly speaking the most deserving task afterward (LAST_BUDDY) let pgsql+oltp scale nice and flat instead of self destructing, but the root cause of collapse was spinners lacking knowledge. With spin done in kernel, you can know when spinning is a waste of perfectly good cycles. -Mike -- 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/