From: Igor Mammedov <imammedo@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] kvm: x86: increase user memory slots to 509
Date: Fri, 14 Nov 2014 15:10:30 +0100 [thread overview]
Message-ID: <20141114151030.75f588bd@igors-macbook-pro.local> (raw)
In-Reply-To: <545BA09E.7040301@redhat.com>
On Thu, 06 Nov 2014 17:23:58 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 06/11/2014 16:52, Igor Mammedov wrote:
> > With the 3 private slots, this gives us 512 slots total.
> > Motivation for this is in addition to assigned devices
> > support more memory hotplug slots, where 1 slot is
> > used by a hotplugged memory stick.
> > It will allow to support upto 256 hotplug memory
> > slots and leave 253 slots for assigned devices and
> > other devices that use them.
> >
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
>
> It would use more memory, and some loops are now becoming more
> expensive. In general adding a memory slot to a VM is not cheap, and
> I question the wisdom of having 256 hotplug memory slots. But the
> slowdown mostly would only happen if you actually _use_ those memory
> slots, so it is not a blocker for this patch.
It might be useful to have a big amount of slots for big guests
and although linux works with minimum section 128Mb but Windows memory
hotplug works just fine even with page-sized slots so when unplug in
QEMU is implemented it would be possible to drop balooning driver at
least there.
And providing that memslots could be allocated during runtime when guest
programs devices or maps roms (i.e. no fail path), I don't see a way
to fix it in QEMU (i.e. avoid abort when limit is reached).
Hence an attempt to bump memslots limit to 512, where current 125
are reserved for initial memory mappings and passthrough devices
256 goes to hotplug memory slots and leaves us 128 free slots for
future expansion.
To see what would be affected by large amount of slots I played with
perf a bit and the biggest hotspot offender with large amount of
memslots was:
gfn_to_memslot() -> ... -> search_memslots()
I'll try to make it faster for this case so 512 memslots wouldn't
affect guest performance.
So please consider applying this patch.
>
> Paolo
next prev parent reply other threads:[~2014-11-14 14:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 15:52 Igor Mammedov
2014-11-06 16:23 ` Paolo Bonzini
2014-11-13 16:31 ` [PATCH] kvm: memslots: replace heap sort with insertion sort Igor Mammedov
2014-11-13 16:58 ` Paolo Bonzini
2014-11-13 23:00 ` [PATCH v2] " Igor Mammedov
2014-11-14 9:57 ` Paolo Bonzini
2014-11-14 10:58 ` Igor Mammedov
2014-11-14 14:10 ` Igor Mammedov [this message]
2014-11-14 14:53 ` [PATCH] kvm: x86: increase user memory slots to 509 Paolo Bonzini
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=20141114151030.75f588bd@igors-macbook-pro.local \
--to=imammedo@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=x86@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
all inboxes | Powered by JetHome®