From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: Re: KVM: x86: move vapic page handling out of fast path
Date: Sun, 22 Jun 2008 14:05:58 -0300 [thread overview]
Message-ID: <20080622170558.GA6587@dmt.cnet> (raw)
In-Reply-To: <485DDC5B.1020707@qumranet.com>
On Sun, Jun 22, 2008 at 08:00:11AM +0300, Avi Kivity wrote:
> Marcelo Tosatti wrote:
>> I fail to see the point of handling the vapic page grab and ref
>> counting in __vcpu_run's heavyweight enter/exit path.
>>
>>
>
> It's to avoid pinning the page indefinitely.
>
>> So move it to kvm_lapic_set_vapic_addr / kvm_free_lapic time.
>>
>> Other than the obvious improvement for non-Flexpriority case, this
>> kills a down_read/up_read pair in heavy exits and reduces code size.
>>
>
> With mmu notifiers we can do this and still not ping the page:
>
> fast path:
>
>
> if (vapic_addr && !vapic_page)
> enter_vapic();
>
>
> mmu notifier:
>
> if (gpa == vapic_addr)
> exit_vapic()
>
>
> So let's wait with this until mmu notifiers are merged.
But what is the point, or advantage, of having the _any_ vapic page
handling in __vcpu_run ?
The reference for it is grabbed at kvm_lapic_set_vapic_addr() (which
does not take any spinlock, so its safe to swapin the page) and released
at guest exit.
So, what do you have against this patch ?
next prev parent reply other threads:[~2008-06-22 17:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-19 17:43 KVM: x86: move vapic page handling out of fast path Marcelo Tosatti
2008-06-22 5:00 ` Avi Kivity
2008-06-22 17:05 ` Marcelo Tosatti [this message]
2008-06-23 2:29 ` Avi Kivity
2008-06-23 14:47 ` Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2008-06-23 15:04 Marcelo Tosatti
2008-06-29 11:53 ` Avi Kivity
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=20080622170558.GA6587@dmt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.