Received: by 10.223.164.221 with SMTP id h29csp490971wrb; Tue, 24 Oct 2017 04:19:53 -0700 (PDT) X-Google-Smtp-Source: ABhQp+THwMH+qK8fzgGgG1POmRrqfwoEpn64Iueftjle1S1AbQqBbsxT1S8MX6clmozu1I/Dh1h+ X-Received: by 10.99.124.87 with SMTP id l23mr14818248pgn.52.1508843993774; Tue, 24 Oct 2017 04:19:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508843993; cv=none; d=google.com; s=arc-20160816; b=TB/nNOOmE28m/i145/agDmNVc2MpmYGwE0feprYcGGc0+ME4+nY/BDDnD92SpxK5vI JzKphPsDxoaurH1jnxpA5qeo0G+KHfLElqNhpHVNGvMl25m18BoBEj/k4mgGw0vekhHJ 2dDuwSibksml+unezDLSVkBrl6LoX5L3o7QY/M2rco5h4jqNfQdoxR8CGmeIhbIxe40u ZXaSrVx0YuUYILEVoBECzWbE8veKK5YENiKElA/Rr4hZPhfE70dgEc9MplyO2Q8DzQ4n BkDkoj7/napPxOkRra1QUnHv/F6y+c8r/KS1zFyhNFi+Ujq7G5xYIKm8RIy7h5fvfivl gcAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dmarc-filter:arc-authentication-results; bh=ddmzsa5TSEU65a37LAyMfoO/8wSPai8f1G8l1Nj7xk4=; b=qqcUfVXH8eQLhh4JHGXQD/j4bVVbEU3iqK4YJa1S6PBfn9cJuzmjmqseK6vG5w+J3M BM3vLjKN+0YzCyNSFLuGJNeFzsQWbjFXUA4SQUevu5lThx92tvWExliwsIGYrOV8iU5l Ea3Sed8Y7d7KDq3LfCHFVBuRMuxLgAN/VyzvTKUyocfzLyr1T2aJAYIpzK3LvXCCk/qN /Bl7a3rjO8dbZmoRgC++FjOTp5bukunqy3Fc7CZCHLo9SgEW/bWaEjOw0izjpgOEnz6S /WluOcw1vM/eiufNvcrRtBk9H+Md2ad383b1XySspt50cvN6wfS6ZiEYzPMJEy4o/w1D ruZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si37310pfj.353.2017.10.24.04.19.38; Tue, 24 Oct 2017 04:19:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932376AbdJXLTK (ORCPT + 99 others); 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 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C9C3A552C7; Tue, 24 Oct 2017 11:19:06 +0000 (UTC) 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 Received: from flask (unknown [10.43.2.80]) by smtp.corp.redhat.com (Postfix) with SMTP id 9EDCA5DA66; Tue, 24 Oct 2017 11:19:00 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Tue, 24 Oct 2017 13:18:59 +0200 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-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 Precedence: bulk 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. From 1582125940777086271@xxx Tue Oct 24 08:14:35 +0000 2017 X-GM-THRID: 1582097697369322680 X-Gmail-Labels: Inbox,Category Forums