From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751830AbdJXQHK (ORCPT ); Tue, 24 Oct 2017 12:07:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19076 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751514AbdJXQHH (ORCPT ); Tue, 24 Oct 2017 12:07:07 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 987AF6A7D6 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=longman@redhat.com Subject: Re: [PATCH 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set To: Eduardo Valentin , Peter Zijlstra Cc: Paolo Bonzini , rkrcmar@redhat.com, Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Jan H . Schoenherr" , Anthony Liguori References: <1508805867-14583-1-git-send-email-eduval@amazon.com> <20171024081345.GK3165@worktop.lehotels.local> <20171024153756.GA5007@u40b0340c692b58f6553c.ant.amazon.com> From: Waiman Long Organization: Red Hat Message-ID: Date: Tue, 24 Oct 2017 12:07:04 -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: <20171024153756.GA5007@u40b0340c692b58f6553c.ant.amazon.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.27]); Tue, 24 Oct 2017 16:07:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/24/2017 11:37 AM, Eduardo Valentin wrote: > Hello Peter, > On Tue, Oct 24, 2017 at 10:13:45AM +0200, Peter Zijlstra wrote: >> On Mon, Oct 23, 2017 at 05:44:27PM -0700, Eduardo Valentin wrote: >>> @@ -46,6 +48,8 @@ static inline bool virt_spin_lock(struct qspinlock *lock) >>> if (!static_cpu_has(X86_FEATURE_HYPERVISOR)) >>> return false; >>> >>> + if (kvm_para_has_feature(KVM_FEATURE_PV_DEDICATED)) >>> + return false; >>> /* >>> * On hypervisors without PARAVIRT_SPINLOCKS support we fall >>> * back to a Test-and-Set spinlock, because fair locks have >> This does not apply. Much has been changed here recently. >> > I checked against Linus master branch before sending. Which tree/branch are you referring to / should I based this? > Please check the tip tree (https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git) which has the latest changes in locking code. Cheers, Longman