mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: He Rongguang <herongguang@linux.alibaba.com>
To: "Wanpeng Li" <kernellwp@gmail.com>,
	"何容光(邦采)" <bangcai.hrg@alibaba-inc.com>
Cc: namit <namit@vmware.com>, peterz <peterz@infradead.org>,
	pbonzini <pbonzini@redhat.com>,
	"dave.hansen" <dave.hansen@intel.com>, mingo <mingo@redhat.com>,
	tglx <tglx@linutronix.de>, x86 <x86@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"dave.hansen" <dave.hansen@linux.intel.com>, bp <bp@alien8.de>,
	luto <luto@kernel.org>, kvm <kvm@vger.kernel.org>,
	"林永听(海枫)" <yongting.lyt@alibaba-inc.com>,
	"吴启翾(启翾)" <qixuan.wqx@alibaba-inc.com>
Subject: Re: [RFC] Question about async TLB flush and KVM pv tlb improvements
Date: Tue, 25 Feb 2020 17:26:08 +0800	[thread overview]
Message-ID: <336cd7de-d4a9-29dd-1150-4f793a03cfa0@linux.alibaba.com> (raw)
In-Reply-To: <CANRm+Cw08uxwW8iUi96CJjmvfbtSd6ePXpAPPScByhoNLCrAWQ@mail.gmail.com>


在 2020/2/25 16:41, Wanpeng Li 写道:
> On Tue, 25 Feb 2020 at 15:53, 何容光(邦采) <bangcai.hrg@alibaba-inc.com> wrote:
>>> On Tue, 25 Feb 2020 at 12:12, 何容光(邦采) <bangcai.hrg@alibaba-inc.com> wrote:
>>>> Hi there,
>>>>
>>>> I saw this async TLB flush patch at https://lore.kernel.org/patchwork/patch/1082481/ , and I am wondering after one year, do you think if this patch is practical or there are functional flaws?
>>>>  From my POV, Nadav's patch seems has no obvious flaw. But I am not familiar about the relationship between CPU's speculation exec and stale TLB, since it's usually transparent from programing. In which condition would machine check occurs? Is there some reference I can learn?
>>>> BTW, I am trying to improve kvm pv tlb flush that if a vCPU is preempted, as initiating CPU is not sending IPI to and waiting for the preempted vCPU, when the preempted vCPU is resuming, I want the VMM to inject an interrupt, perhaps NMI, to the vCPU and letting vCPU flush TLB instead of flush TLB for the vCPU, in case the vCPU is not in kernel mode or disabled interrupt, otherwise stick to VMM flush. Since VMM flush using INVVPID would flush all TLB of all PCID thus has some negative performance impacting on the preempted vCPU. So is there same problem as the async TLB flush patch?
>>> PV TLB Shootdown is disabled in dedicated scenario, I believe there
>>> are already heavy tlb misses in overcommit scenarios before this
>>> feature, so flush all TLB associated with one specific VPID will not
>>> worse that much.
>> If vcpus running on one pcpu is limited to a few, from my test, there
>> can still be some beneficial. Especially if we can move all the logic to
> Unless the vCPU is preempted.

Correct, in fact I am using a no-IPI-in-VM approch, that's why I am 
asking about the

async approch.

>> VMM eliminating waiting of IPI, however correctness of functionally
>> is a concern. This is also why I found Nadav's patch, do you have
>> any advice on this?

  reply	other threads:[~2020-02-25  9:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  4:12 何容光(邦采)
2020-02-25  6:31 ` Wanpeng Li
2020-02-25  7:53   ` 回复:[RFC] " 何容光(邦采)
2020-02-25  8:41     ` [RFC] " Wanpeng Li
2020-02-25  9:26       ` He Rongguang [this message]
     [not found] ` <C6DFCB69-25A6-43FE-92E9-C9E675CAB615@vmware.com>
2020-02-25  7:25   ` 回复:[RFC] " 何容光(邦采)

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=336cd7de-d4a9-29dd-1150-4f793a03cfa0@linux.alibaba.com \
    --to=herongguang@linux.alibaba.com \
    --cc=bangcai.hrg@alibaba-inc.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namit@vmware.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qixuan.wqx@alibaba-inc.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yongting.lyt@alibaba-inc.com \
    /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

all inboxes | Powered by JetHome®