From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936009AbdIYOou (ORCPT ); Mon, 25 Sep 2017 10:44:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48034 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935980AbdIYOos (ORCPT ); Mon, 25 Sep 2017 10:44:48 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BC72B552EA Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=longman@redhat.com Subject: Re: [PATCH v3 0/2] guard virt_spin_lock() with a static key To: Juergen Gross , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, x86@kernel.org, virtualization@lists.linux-foundation.org Cc: jeremy@goop.org, chrisw@sous-sol.org, akataria@vmware.com, rusty@rustcorp.com.au, boris.ostrovsky@oracle.com, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, peterz@infradead.org References: <20170906173625.18158-1-jgross@suse.com> <780c50a0-160b-24e3-a5b2-6685953882e5@suse.com> From: Waiman Long Organization: Red Hat Message-ID: <67764edc-4cb5-2404-ec90-6cb83a094298@redhat.com> Date: Mon, 25 Sep 2017 10:44:42 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <780c50a0-160b-24e3-a5b2-6685953882e5@suse.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 25 Sep 2017 14:44:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/25/2017 09:59 AM, Juergen Gross wrote: > Ping? > > On 06/09/17 19:36, Juergen Gross wrote: >> With virt_spin_lock() being guarded by a static key the bare metal case >> can be optimized by patching the call away completely. In case a kernel >> running as a guest it can decide whether to use paravitualized >> spinlocks, the current fallback to the unfair test-and-set scheme, or >> to mimic the bare metal behavior. >> >> V3: >> - remove test for hypervisor environment from virt_spin_lock(9 as >> suggested by Waiman Long >> >> V2: >> - use static key instead of making virt_spin_lock() a pvops function >> >> Juergen Gross (2): >> paravirt/locks: use new static key for controlling call of >> virt_spin_lock() >> paravirt,xen: correct xen_nopvspin case >> >> arch/x86/include/asm/qspinlock.h | 11 ++++++++++- >> arch/x86/kernel/paravirt-spinlocks.c | 6 ++++++ >> arch/x86/kernel/smpboot.c | 2 ++ >> arch/x86/xen/spinlock.c | 2 ++ >> kernel/locking/qspinlock.c | 4 ++++ >> 5 files changed, 24 insertions(+), 1 deletion(-) >> Acked-by: Waiman Long