From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set Date: Tue, 24 Oct 2017 13:18:59 +0200 Message-ID: <20171024111859.GA13316@flask> References: <1508805867-14583-1-git-send-email-eduval@amazon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , Waiman Long , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Jan H . Schoenherr" , Anthony Liguori To: Eduardo Valentin Return-path: Content-Disposition: inline In-Reply-To: <1508805867-14583-1-git-send-email-eduval@amazon.com> Sender: linux-doc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2017-10-23 17:44-0700, Eduardo Valentin: > Currently, the existing qspinlock implementation will fallback to > test-and-set if the hypervisor has not set the PV_UNHALT flag. Where have you detected the main source of overhead with pinned VCPUs? Makes me wonder if we couldn't improve general PV_UNHALT, thanks. > This patch gives the opportunity to guest kernels to select > between test-and-set and the regular queueu fair lock implementation > based on the PV_DEDICATED KVM feature flag. When the PV_DEDICATED > flag is not set, the code will still fall back to test-and-set, > but when the PV_DEDICATED flag is set, the code will use > the regular queue spinlock implementation. Some flag makes sense and we do want to make sure that userspaces don't enable it in pass-through-cpuid mode.