From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEUlp-0008Ca-Ow for qemu-devel@nongnu.org; Tue, 27 Aug 2013 21:42:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEUlk-00069U-Rw for qemu-devel@nongnu.org; Tue, 27 Aug 2013 21:42:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEUlk-00069P-Km for qemu-devel@nongnu.org; Tue, 27 Aug 2013 21:42:00 -0400 Message-ID: <521D5298.9050504@redhat.com> Date: Tue, 27 Aug 2013 19:30:00 -0600 From: Eric Blake MIME-Version: 1.0 References: <1377264277-23614-1-git-send-email-drjones@redhat.com> In-Reply-To: <1377264277-23614-1-git-send-email-drjones@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Mai3tvb9Lgcu5kJomWHnAm3a19nTRmspw" Subject: Re: [Qemu-devel] [libvirt] [PATCH v2] kvm: warn if num cpus is greater than num recommended List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones Cc: ehabkost@redhat.com, kvm@vger.kernel.org, libvir-list@redhat.com, mtosatti@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, afaerber@suse.de This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Mai3tvb9Lgcu5kJomWHnAm3a19nTRmspw Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/23/2013 07:24 AM, Andrew Jones wrote: > The comment in kvm_max_vcpus() states that it's using the recommended > procedure from the kernel API documentation to get the max number > of vcpus that kvm supports. It is, but by always returning the > maximum number supported. The maximum number should only be used > for development purposes. qemu should check KVM_CAP_NR_VCPUS for > the recommended number of vcpus. This patch adds a warning if a user > specifies a number of cpus between the recommended and max. >=20 > v2: > Incorporate tests for max_cpus, which specifies the maximum number > of hotpluggable cpus. An additional note is that the message for > the fail case was slightly changed, 'exceeds max cpus' to > 'exceeds the maximum cpus'. If this is unacceptable change for > users like libvirt, then I'll need to spin a v3. A quick grep of libvirt does not show any dependence on the particular wording "exceeds max cpus", so you are probably fine changing that. What I'm more worried about is what number is libvirt supposed to show to the end user, and should libvirt enforce the lower recommended max, or the larger kernel absolute max? Which of the two values does the QMP 'MachineInfo' type return in its 'cpu-max' field during the 'query-machines' command? Should we be modifying QMP to return both values, so that libvirt can also expose the logic to the end user of allowing a recommended vs. larger development max? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Mai3tvb9Lgcu5kJomWHnAm3a19nTRmspw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSHVKYAAoJEKeha0olJ0Nq8y4H/AmE0J1nkHvzhp+J3ynJIUGD ne0k81CULkw90iSlRRqE83Zz/BDGNbwGvdkVuqUNatYeQ52ggPtHV2+SGQgxYVD4 pzz7PaU1lDoJkFl+aFLF/A2ey9QRiqxFwjLv98EHgktgzPwwluEPrG01QFGw0r5v ZR/DY0kVJHNdRLIWn7wINRqogrjyQ1GaLaFW5IlivgREH8vZK/R5RHAK5Ledsl9a F8yrFzng9Jt64cvDnhcH/Vs2kohaTVxkzlLqreUjWvyhKrJK2w8TN/Z1TCfCO4mW R5lBAOtIBzR2KjnBvajJp22NYk0G+diOtKD8nXi5ETpwH56OcVdib0avm+J0mEo= =JWjG -----END PGP SIGNATURE----- --Mai3tvb9Lgcu5kJomWHnAm3a19nTRmspw--