From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts Date: Wed, 26 Jan 2011 09:14:50 +0100 Message-ID: <4D3FD7FA.7080902@web.de> References: <20110121233040.22262.68117.stgit@s20.home> <20110124093241.GA28654@amt.cnet> <4D3D89B1.30300@siemens.com> <1295883899.3230.9.camel@x201> <1295933876.3230.46.camel@x201> <4D3E7D74.1030100@web.de> <1295966492.3230.55.camel@x201> <4D3EE3F8.3020603@redhat.com> <4D3EFBDC.201@web.de> <1295982831.3230.90.camel@x201> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0C8B6A042179BF3168E460E5" Cc: Avi Kivity , Marcelo Tosatti , "kvm@vger.kernel.org" , "ddutile@redhat.com" , "mst@redhat.com" , "chrisw@redhat.com" To: Alex Williamson Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:38006 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751583Ab1AZIPb (ORCPT ); Wed, 26 Jan 2011 03:15:31 -0500 In-Reply-To: <1295982831.3230.90.camel@x201> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0C8B6A042179BF3168E460E5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2011-01-25 20:13, Alex Williamson wrote: > On Tue, 2011-01-25 at 17:35 +0100, Jan Kiszka wrote: >> On 2011-01-25 15:53, Avi Kivity wrote: >>> On 01/25/2011 04:41 PM, Alex Williamson wrote: >>>>> > >>>>> > >>>>> > kvm: Allow memory slot array to grow on demand >>>>> > >>>>> > Remove fixed KVM_MEMORY_SLOTS limit, allowing the slot array >>>>> > to grow on demand. Private slots are now allocated at the >>>>> > front instead of the end. Only x86 seems to use private slots,= >>>>> >>>>> Hmm, doesn't current user space expect slots 8..11 to be the priva= te >>>>> ones and wouldn't it cause troubles if slots 0..3 are suddenly >>>> reserved? >>>> >>>> The private slots aren't currently visible to userspace, they're >>>> actually slots 32..35. The patch automatically increments user pass= ed >>>> slot ids so userspace has it's own zero-based view of the array. >>>> Frankly, I don't understand why userspace reserves slots 8..11, is t= his >>>> compatibility with older kernel implementations? >>> >>> I think so. I believe these kernel versions are too old now to matte= r, >>> but of course I can't be sure. >> >> Will check and enable those 4 additional slots for user space if we no= >> longer need to exclude them. >=20 > Appears that the history goes something like this... >=20 > * Once upon a time we had 8 memory slots >=20 > * v2.6.24-4949-ge0d62c7 added 4 reserved slots above those 8 >=20 > * v2.6.24-4950-gcbc9402 made use of slot 8 for tss >=20 > * v2.6.24-4962-gf78e0e2 made use of slot 9 for tpr >=20 > * v2.6.25-5341-gef2979b bumped the 8 slots to 32 >=20 > * v2.6.26-rc1-13-gb7ebfb0 made use of slot 10 for ept >=20 > * v2.6.28-4952-g6fe6397 moved the previously hard coded slots > 8,9,10 up to KVM_MEMORY_SLOTS + {0,1,2} >=20 Nice overview! > So we haven't needed to reserve 8..11 for a while and we've never made > use of all 4 private slots. I should reduce that to 3 in my patch. > Maybe there's a test we could do in userspace to figure out we don't > have to skip those anymore? We can simply remove the test, 2.6.29 is our entry barrier for both upstream and qemu-kvm now. Jan --------------enig0C8B6A042179BF3168E460E5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk0/1/oACgkQitSsb3rl5xRs4ACdGJOGoyE8eNeJlInGzUGkxRBG GywAnR0NYUA721DD+CExwT1PLvI0zlSV =We1a -----END PGP SIGNATURE----- --------------enig0C8B6A042179BF3168E460E5--