public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Roman Kagan <rkagan@virtuozzo.com>
Cc: "Denis Plotnikov" <dplotnikov@virtuozzo.com>,
	kvm@vger.kernel.org, x86@kernel.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	"Haiyang Zhang" <haiyangz@microsoft.com>,
	"Stephen Hemminger" <sthemmin@microsoft.com>,
	"Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>,
	"Mohammed Gamal" <mmorsy@redhat.com>,
	"Cathy Avery" <cavery@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] KVM: x86: hyperv: PV TLB flush for Windows guests
Date: Tue, 03 Apr 2018 16:53:12 +0200	[thread overview]
Message-ID: <871sfwxrxj.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20180403100003.GE2874@rkaganb.sw.ru> (Roman Kagan's message of "Tue, 3 Apr 2018 13:00:04 +0300")

Roman Kagan <rkagan@virtuozzo.com> 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

      reply	other threads:[~2018-04-03 14:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-02 16:10 [PATCH 0/5] KVM: x86: hyperv: PV TLB flush for Windows guests Vitaly Kuznetsov
2018-04-02 16:10 ` [PATCH 1/5] x86/hyper-v: move struct hv_flush_pcpu{,ex} definitions to common header Vitaly Kuznetsov
2018-04-02 16:10 ` [PATCH 2/5] KVM: x86: hyperv: use defines when parsing hypercall parameters Vitaly Kuznetsov
2018-04-02 16:10 ` [PATCH 3/5] KVM: x86: hyperv: simplistic HVCALL_FLUSH_VIRTUAL_ADDRESS_{LIST,SPACE} implementation Vitaly Kuznetsov
2018-04-03 19:15   ` Radim Krčmář
2018-04-04  9:27     ` Vitaly Kuznetsov
2018-04-04  9:41       ` Vitaly Kuznetsov
2018-04-02 16:10 ` [PATCH 4/5] KVM: x86: hyperv: simplistic HVCALL_FLUSH_VIRTUAL_ADDRESS_{LIST,SPACE}_EX implementation Vitaly Kuznetsov
2018-04-02 16:10 ` [PATCH 5/5] KVM: x86: hyperv: declare KVM_CAP_HYPERV_TLBFLUSH capability Vitaly Kuznetsov
2018-04-03 10:00 ` [PATCH 0/5] KVM: x86: hyperv: PV TLB flush for Windows guests Roman Kagan
2018-04-03 14:53   ` Vitaly Kuznetsov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871sfwxrxj.fsf@vitty.brq.redhat.com \
    --to=vkuznets@redhat.com \
    --cc=Michael.H.Kelley@microsoft.com \
    --cc=cavery@redhat.com \
    --cc=dplotnikov@virtuozzo.com \
    --cc=haiyangz@microsoft.com \
    --cc=kvm@vger.kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmorsy@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rkagan@virtuozzo.com \
    --cc=rkrcmar@redhat.com \
    --cc=sthemmin@microsoft.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox