From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754818Ab2IOQRF (ORCPT ); Sat, 15 Sep 2012 12:17:05 -0400 Received: from mga02.intel.com ([134.134.136.20]:59111 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753126Ab2IOQRD (ORCPT ); Sat, 15 Sep 2012 12:17:03 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,428,1344236400"; d="scan'208";a="193416643" From: Andi Kleen To: Mike Galbraith Cc: Linus Torvalds , Borislav Petkov , Nikolay Ulyanitsky , linux-kernel@vger.kernel.org, Andreas Herrmann , Peter Zijlstra , Andrew Morton , Thomas Gleixner , Ingo Molnar Subject: Re: 20% performance drop on PostgreSQL 9.2 from kernel 3.5.3 to 3.6-rc5 on AMD chipsets - bisected References: <20120914212717.GA29307@liondog.tnic> <1347680006.4340.142.camel@marge.simpson.net> Date: Sat, 15 Sep 2012 09:16:59 -0700 In-Reply-To: <1347680006.4340.142.camel@marge.simpson.net> (Mike Galbraith's message of "Sat, 15 Sep 2012 05:33:26 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mike Galbraith writes: > > The only reason I can think of why pgbench might suffer is postgres's > userspace spinlocks. If you always look for an idle core, you improve > the odds that the wakeup won't preempt a lock holder, sending others > into a long spin. User space spinlocks like this unfortunately have a tendency to break with all kinds of scheduler changes. We've seen this frequently too with other users. The best bet currently is to use the real time scheduler, but with various tweaks to get its overhead down. Ultimatively the problem is that user space spinlocks with CPU oversubcription is a very unstable setup and small changes can easily disturb it. Just using futex is unfortunately not the answer either. -Andi -- ak@linux.intel.com -- Speaking for myself only