From: Xiao Guangrong <guangrong.xiao@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: rkrcmar@redhat.com, Vitaly Kuznetsov <vkuznets@redhat.com>,
Junaid Shahid <junaids@google.com>,
Xiao Guangrong <xiaoguangrong@tencent.com>
Subject: Re: [PATCH] KVM: try __get_user_pages_fast even if not in atomic context
Date: Mon, 6 Aug 2018 15:51:21 +0800 [thread overview]
Message-ID: <54a94492-bb0a-3d2c-6c34-64b6c4336b0a@gmail.com> (raw)
In-Reply-To: <1532706407-11380-1-git-send-email-pbonzini@redhat.com>
On 07/27/2018 11:46 PM, Paolo Bonzini wrote:
> We are currently cutting hva_to_pfn_fast short if we do not want an
> immediate exit, which is represented by !async && !atomic. However,
> this is unnecessary, and __get_user_pages_fast is *much* faster
> because the regular get_user_pages takes pmd_lock/pte_lock.
> In fact, when many CPUs take a nested vmexit at the same time
> the contention on those locks is visible, and this patch removes
> about 25% (compared to 4.18) from vmexit.flat on a 16 vCPU
> nested guest.
>
Nice improvement.
Then after that, we will unconditionally try hva_to_pfn_fast(), does
it hurt the case that the mappings in the host's page tables have not
been present yet?
Can we apply this tech to other places using gup or even squash it
into get_user_pages()?
next prev parent reply other threads:[~2018-08-06 7:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 15:46 Paolo Bonzini
2018-07-30 8:40 ` David Hildenbrand
2018-08-06 7:51 ` Xiao Guangrong [this message]
2018-08-06 11:44 ` Paolo Bonzini
2018-08-06 17:39 ` Andrea Arcangeli
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=54a94492-bb0a-3d2c-6c34-64b6c4336b0a@gmail.com \
--to=guangrong.xiao@gmail.com \
--cc=junaids@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=vkuznets@redhat.com \
--cc=xiaoguangrong@tencent.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®