From: Anthony Liguori <aliguori@us.ibm.com>
To: Avi Kivity <avi@qumranet.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [kvm-devel] [PATCH 6/13] KVM: memory slot management
Date: Fri, 27 Oct 2006 10:43:40 -0500 [thread overview]
Message-ID: <4542292C.3080409@us.ibm.com> (raw)
In-Reply-To: <454208EB.7080007@qumranet.com>
Avi Kivity wrote:
>>> 2. The next mmu implementation, which caches guest translations.
>>>
>>> The potential problem above now becomes acute. The guest will have
>>> kernel mappings for every page, and after a short while they'll all be
>>> faulted in and locked. This defeats the swap integration which is IMO a
>>> very strong point.
>>>
>>> We can work around that by periodically forcing out translations (some
>>> kind of clock algorithm) at some rate so the host vm can have a go at
>>> them. That can turn out to be expensive as we'll need to interrupt all
>>> running vcpus to flush (real) tlb entries.
>>>
>>>
>> Don't understand. Can't one CPU cause a TLB entry to be flushed on all
>> CPUs?
>>
>>
>>
>
> It's not about tlb entries. The shadow page tables collaples a GV -> HV
> -> HP double translation into a GV -> HP page table. When the Linux vm
> goes around evicting pages, it invalidates those mappings.
>
> There are two solutions possible: lock pages which participate in these
> translations (and their number can be large) or modify the Linux vm to
> consult a reverse mapping and remove the translations (in which case TLB
> entries need to be removed).
>
If you locked pages that have active shadow mappings, you could then use
a secondary mechanism to invalidate existing mappings when necessary.
You could even base this on a user-configurable heuristic (give this VM
1G of memory, with 512MB of dedicated memory for instance).
I seem to recall some discussion about having a memory pressure
notification mechanism. If such a thing existed, this could be used to
reduce the guests actual memory foot print. I'm woefully ignorant
though of any recent developments in this area...
Regards,
Anthony Liguori
next prev parent reply other threads:[~2006-10-27 15:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 17:19 [PATCH 0/13] KVM: Kernel-based Virtual Machine (v3) Avi Kivity
2006-10-26 17:22 ` [PATCH 1/13] KVM: userspace interface Avi Kivity
[not found] ` <200610270051.43477.arnd@arndb.de>
2006-10-27 5:51 ` Avi Kivity
2006-10-26 17:23 ` [PATCH 2/13] KVM: Intel virtual mode extensions definitions Avi Kivity
2006-10-26 17:24 ` [PATCH 3/13] KVM: kvm data structures Avi Kivity
2006-10-26 22:55 ` Arnd Bergmann
2006-10-27 5:53 ` Avi Kivity
2006-10-27 7:39 ` Arnd Bergmann
2006-10-26 17:25 ` [PATCH 4/13] KVM: random accessors and constants Avi Kivity
2006-10-26 17:26 ` [PATCH 5/13] KVM: virtualization infrastructure Avi Kivity
2006-10-26 17:27 ` [PATCH 6/13] KVM: memory slot management Avi Kivity
2006-10-26 22:44 ` Arnd Bergmann
2006-10-27 5:47 ` Avi Kivity
2006-10-27 7:37 ` Arnd Bergmann
2006-10-27 13:26 ` Avi Kivity
2006-10-27 14:05 ` Arnd Bergmann
2006-10-29 9:10 ` Avi Kivity
2006-10-27 15:43 ` Anthony Liguori [this message]
2006-10-29 9:15 ` [kvm-devel] " Avi Kivity
2006-10-26 17:28 ` [PATCH 7/13] KVM: vcpu creation and maintenance Avi Kivity
2006-10-26 17:29 ` [PATCH 8/13] KVM: vcpu execution loop Avi Kivity
2006-10-26 17:30 ` [PATCH 9/13] KVM: define exit handlers Avi Kivity
2006-10-26 17:31 ` [PATCH 10/13] KVM: less common " Avi Kivity
2006-10-26 17:32 ` [PATCH 11/13] KVM: mmu Avi Kivity
2006-10-26 17:33 ` [PATCH 12/13] KVM: x86 emulator Avi Kivity
2006-10-26 17:34 ` [PATCH 13/13] KVM: plumbing 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=4542292C.3080409@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=arnd@arndb.de \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox