From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>,
Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>,
kvm@vger.kernel.org
Subject: Re: [PATCH v2 1/5] KVM: Add APIs for unlocked TLB flush
Date: Thu, 17 May 2012 14:51:51 +0300 [thread overview]
Message-ID: <4FB4E657.1000506@redhat.com> (raw)
In-Reply-To: <1337250284-18607-1-git-send-email-avi@redhat.com>
On 05/17/2012 01:24 PM, Avi Kivity wrote:
> Currently we flush the TLB while holding mmu_lock. This
> increases the lock hold time by the IPI round-trip time, increasing
> contention, and makes dropping the lock (for latency reasons) harder.
>
> This patch changes TLB management to be usable locklessly, introducing
> the following APIs:
>
> kvm_mark_tlb_dirty() - mark the TLB as containing stale entries
> kvm_cond_flush_remote_tlbs() - flush the TLB if it was marked as
> dirty
>
> These APIs can be used without holding mmu_lock (though if the TLB
> became stale due to shadow page table modifications, typically it
> will need to be called with the lock held to prevent other threads
> from seeing the modified page tables with the TLB unmarked and unflushed)/
>
Oops, forgot the cover letter and the changelog. I'm experimenting with
posting directly from git send-email.
The change is the new patch 2 which tries to ensure we never bypass a
tlb flush. Perhaps a better way to do it is to move the
kvm_cond_flush_remote_tlbs() _before_ the code that depends on them,
instead of after the code that changes the spte.
Please review carefully.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2012-05-17 11:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 10:24 [PATCH v2 1/5] KVM: Add APIs for unlocked TLB flush Avi Kivity
2012-05-17 10:24 ` [PATCH v2 2/5] KVM: MMU: Convert remote flushes to kvm_mark_tlb_dirty() and a conditional flush Avi Kivity
2012-05-21 20:13 ` Marcelo Tosatti
2012-05-22 14:46 ` Takuya Yoshikawa
2012-05-17 10:24 ` [PATCH v2 3/5] KVM: Flush TLB in mmu notifier without holding mmu_lock Avi Kivity
2012-05-21 20:58 ` Marcelo Tosatti
2012-05-21 21:07 ` Marcelo Tosatti
2012-07-02 12:05 ` Avi Kivity
2012-07-02 12:41 ` Avi Kivity
2012-07-02 14:09 ` Takuya Yoshikawa
2012-07-02 14:18 ` Avi Kivity
2012-05-17 10:24 ` [PATCH v2 4/5] KVM: Flush TLB in FNAME(invlpg) " Avi Kivity
2012-05-17 10:24 ` [PATCH v2 5/5] KVM: Flush TLB in change_pte mmu notifier " Avi Kivity
2012-05-17 11:51 ` Avi Kivity [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=4FB4E657.1000506@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=xiaoguangrong@linux.vnet.ibm.com \
--cc=yoshikawa.takuya@oss.ntt.co.jp \
/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;
as well as URLs for NNTP newsgroup(s).