Received: by 10.213.65.68 with SMTP id h4csp3610193imn; Tue, 3 Apr 2018 07:54:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/kRfvnsR3WMeILVwG+lNkJnqidbR8D7kFapCBtnFkmEMfQvXwzgc1SSpN2Z3nDKKlOdLPn X-Received: by 2002:a17:902:bb87:: with SMTP id m7-v6mr14671011pls.103.1522767284062; Tue, 03 Apr 2018 07:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522767284; cv=none; d=google.com; s=arc-20160816; b=sAoQ5jtjbcAVEcO3xEGMrnaX/hxyWh3C5iX90xgZV+g0qKNtN2r+PAUpL/2J9isSch PphTxZELafYnkejemEvrD8pZe9V9HW5dMaRzDUlgTuPKE084wo9zEjlgwadYP3n1vZKJ fGhg3zAKLzxD9fcDTOHiGeBZ150fvxA6kE/fwEwQsALKTf1gkmlaN3atsVPQaJOy76xe k+fKIfV4f8MhX6LO6ar9o5iJ+Ocj1Rzi7tkW8JgH31uy//5BrkS2+lsdJtHqxrabgxM7 gkdToZlIHERBxPfSnriUhlqkHDO/AFzWzLWLtiPVMfH6SzZ4nwcuS4q2ohF4tfvY/a9n MoJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=1BtEMY4iJVxShw/tLVFqKJZM+3HD9txAAYzrN0OO/Zw=; b=xeZ+CfF0Nv9Wxztfw5OuA3BBuWpsD8jevIGBw2UaN5aNS2NvcCbUsUAy9PXFbUqMlR 5HH7/fkL0ZZb48+ypd+a88O2PpXnlVZ15ldex8FiEmU4zPLgSEBkQC40M/zwIGbwTdXM rzzIagvXHh4eF3i/XxSjEWoHMnZ3ueXLZoAkKvhfhV/Mg7b7vdPUdOuyk4FAq843PiYw j1nSS7WnUh6HZAK4cqDJc7I8qnlA1JEpGlb+9YLpZ1vLLYpx2MMU6FfVr2Cwln9VC5n8 YonNmar2n4gAUeaIO2DlvIYjNcPHDlPgcIvPVw8t/ooAX4muvcZhX3HiJ0+kAMAyfI0k WwMw== 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 f21si2069264pgn.693.2018.04.03.07.54.30; Tue, 03 Apr 2018 07:54:44 -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 S1751975AbeDCOxT (ORCPT + 99 others); Tue, 3 Apr 2018 10:53:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57988 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751649AbeDCOxQ (ORCPT ); Tue, 3 Apr 2018 10:53:16 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F2E534022909; Tue, 3 Apr 2018 14:53:15 +0000 (UTC) Received: from vitty.brq.redhat.com.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0B06410B2B22; Tue, 3 Apr 2018 14:53:13 +0000 (UTC) From: Vitaly Kuznetsov To: Roman Kagan Cc: Denis Plotnikov , kvm@vger.kernel.org, x86@kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley \(EOSG\)" , Mohammed Gamal , Cathy Avery , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/5] KVM: x86: hyperv: PV TLB flush for Windows guests References: <20180402161059.8488-1-vkuznets@redhat.com> <20180403100003.GE2874@rkaganb.sw.ru> Date: Tue, 03 Apr 2018 16:53:12 +0200 In-Reply-To: <20180403100003.GE2874@rkaganb.sw.ru> (Roman Kagan's message of "Tue, 3 Apr 2018 13:00:04 +0300") Message-ID: <871sfwxrxj.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 03 Apr 2018 14:53:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 03 Apr 2018 14:53:16 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'vkuznets@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Roman Kagan writes: > On Mon, Apr 02, 2018 at 06:10:54PM +0200, Vitaly Kuznetsov wrote: >> >> Feature description: >> >> PV TLB flush helps a lot when running overcommited. KVM gained support for >> it recently but it is only available for Linux guests. Windows guests use >> emulated Hyper-V interface and PV TLB flush needs to be added there. >> > > I vaguely remember Denis Plotnikov (cc-d) did a similar attempt a couple > of years ago. IIRC the outcome was that win2012r2 (back then) guests > started to also use this mechanism for local tlb flushes via self-IPI, > which led to noticable degradation on certain workloads. > Thanks for the feedback, in theory it shouldn't do that. Hyper-V has different enlightenments for local and remote TLB flushing: Implementation Recommendations - 0x40000004 ... Bit 1: Recommend using hypercall for local TLB flushes rather than INVLPG or MOV to CR3 instructions Bit 2: Recommend using hypercall for remote TLB flushes rather than inter-processor interrupts ... I see no reason to do local flushes with a hypercall so we'll only be announcing remote. In case things are irreparably broken with WS2012 we can still have the feature in KVM and decide if we want to announce it to guests on a higher level (probably even higher than Qemu as this will just become another 'hv_tlbflush' feature which needs to be enabled) based on Windows version. -- Vitaly