From: Marcelo Tosatti <mtosatti@redhat.com>
To: Bhushan Bharat-R65777 <R65777@freescale.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"agraf@suse.de" <agraf@suse.de>
Subject: Re: Increase KVMSlots size
Date: Tue, 31 Jan 2012 18:12:26 -0200 [thread overview]
Message-ID: <20120131201226.GA16701@amt.cnet> (raw)
In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D0B6AB9@039-SN2MPN1-022.039d.mgd.msft.net>
On Tue, Jan 31, 2012 at 11:47:32AM +0000, Bhushan Bharat-R65777 wrote:
> Hi All,
>
> In my development I came across the state where I need more than 32 kvmslots
>
> QEMU/kvm-all.c:
>
> <cut>
> struct KVMState
> {
> KVMSlot slots[32];
>
> <cut>
>
>
> Followings are the solution I thought of:
> Solution 1:
> Increase the slot to 64 in both KVM and QEMU. I think this will also require to add a new ioctl call so that qemu can come to know on which KVM it is running (whether it is running on 32 slots KVM or 64 slots KVM).
It already exists, its called KVM_CAP_NR_MEMSLOTS (implemented by x86).
> Other solutions:
> a) Decouple the qemu and kvm data structure. QEMU and KVM use some variable size data structure or lists etc. QEMU can keep on adding as many as it wants without knowing how much slots KVM supports.
> b) There are linear search in the KVM slots array in critical path of code of KVM. Does this make some sense using RB-tree, heapsort, balanced binary tree type of solutions?
See discussion at http://lwn.net/Articles/429308/.
x86 optimizes the case of a miss (GFN not mapped by any memslot)
by caching the result into a specially invalid pagetable entry (so
an invalid fault optimizes away the need to walk all memslots).
It would be good to know how much of a problem an increased memslot
array is for PPC.
>
> Looking forward for suggestions.
>
> Thanks
> -Bharat
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2012-01-31 20:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 11:47 Increase KVMSlots size Bhushan Bharat-R65777
2012-01-31 20:12 ` Marcelo Tosatti [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=20120131201226.GA16701@amt.cnet \
--to=mtosatti@redhat.com \
--cc=R65777@freescale.com \
--cc=agraf@suse.de \
--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 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).