From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188AbbIERpi (ORCPT ); Sat, 5 Sep 2015 13:45:38 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:43998 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752102AbbIERpa (ORCPT ); Sat, 5 Sep 2015 13:45:30 -0400 Date: Sat, 5 Sep 2015 19:45:19 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Dave Chinner , Linux Kernel Mailing List , Waiman Long , Ingo Molnar Subject: Re: [4.2, Regression] Queued spinlocks cause major XFS performance regression Message-ID: <20150905174519.GU3644@twins.programming.kicks-ass.net> References: <20150904054820.GY3902@dastard> <20150904071143.GZ3902@dastard> <20150904082954.GB3902@dastard> <20150904151427.GG18489@twins.programming.kicks-ass.net> <20150904153035.GH18489@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 04, 2015 at 08:58:38AM -0700, Linus Torvalds wrote: > On Fri, Sep 4, 2015 at 8:30 AM, Peter Zijlstra wrote: > >> And even ignoring the "implementation was crap" issue, some people may > >> well want their kernels to be "bare hardware" kernels even under a > >> hypervisor. It may be a slim hypervisor that gives you all the cpus, > >> or it may just be a system that is just sufficiently overprovisioned, > >> so you don't get vcpu preemption in practice. > > > > Fair enough; I had not considered the slim hypervisor case. > > > > Should I place the virt_spin_lock() thing under CONFIG_PARAVIRT (maybe > > even _SPINLOCKS) such that only paravirt enabled kernels when ran on a > > hypervisor that does not support paravirt patching (HyperV, VMware, > > etc..) revert to the test-and-set? > > My gut feel would be to try to match out old paravirt setup, which > similarly replaced the ticket locks with the test-and-set lock, and > try to match the situation where that happened? I'm not sure there was a test-and-set option in 4.1. Either the hypervisor layer implemented paravirt spinlocks (Xen, KVM) (and you selected CONFIG_PARAVIRT_SPINLOCKS, which had a fairly large negative impact on native code), or you got our native locking. So if you want I can simply remove the whole test-and-set thing, but I'd rather fix it and put it under one of the PARAVIRT options.