From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932394AbdJXLTK (ORCPT ); Tue, 24 Oct 2017 07:19:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40240 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932230AbdJXLTH (ORCPT ); Tue, 24 Oct 2017 07:19:07 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C9C3A552C7 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=rkrcmar@redhat.com Date: Tue, 24 Oct 2017 13:18:59 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Eduardo Valentin 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 Subject: Re: [PATCH 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set 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 Content-Disposition: inline In-Reply-To: <1508805867-14583-1-git-send-email-eduval@amazon.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 24 Oct 2017 11:19:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.