From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753927AbdKIQph (ORCPT ); Thu, 9 Nov 2017 11:45:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58574 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753500AbdKIQpe (ORCPT ); Thu, 9 Nov 2017 11:45:34 -0500 Date: Thu, 9 Nov 2017 17:45:23 +0100 From: Radim Krcmar To: Peter Zijlstra Cc: Pankaj Gupta , Wanpeng Li , Eduardo Valentin , Paolo Bonzini , Matt Wilson , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Waiman Long , kvm , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Jan H . Schoenherr" , Anthony Liguori Subject: Re: [PATCHv3 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set Message-ID: <20171109164523.GF20859@flask> References: <1509999980-10828-1-git-send-email-eduval@amazon.com> <789734192.29237413.1510242805535.JavaMail.zimbra@redhat.com> <20171109160536.GE20859@flask> <20171109161701.y3eqqrvs5jpg46lr@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171109161701.y3eqqrvs5jpg46lr@hirez.programming.kicks-ass.net> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 09 Nov 2017 16:45:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-09 17:17+0100, Peter Zijlstra: > On Thu, Nov 09, 2017 at 05:05:36PM +0100, Radim Krcmar wrote: > > 2017-11-09 10:53-0500, Pankaj Gupta: > > > 2] PV TLB should also behave as per option PV_DEDICATED for better performance. > > > > Right, > > Shouldn't KVM do flush_tlb_other() in any case? Not sure how > PV_DEDICATED can help with that. It will, the suggestion was based on recent extension of the flush_tlb_others implementaion, https://lkml.org/lkml/2017/11/8/1146. PV_TLB_FLUSH allows a guest to set a flush bit instead of sending flush IPI if the target VCPU is not running. This would be a waste of time with PV_DEDICATED as all VCPUs are expected to always running. With PV_DEDICATED, the guest should keep using native_flush_tlb_others.