From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH] x86: Raise the hard VCPU count limit Date: Wed, 13 Jul 2011 23:00:47 +0300 Message-ID: <1310587247.28301.2.camel@lappy> References: <1310214320-12488-1-git-send-email-levinsasha928@gmail.com> <4E1D9DFF.1090403@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Ingo Molnar , Marcelo Tosatti , Pekka Enberg To: Avi Kivity Return-path: Received: from mail-wy0-f174.google.com ([74.125.82.174]:46106 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177Ab1GMUBE (ORCPT ); Wed, 13 Jul 2011 16:01:04 -0400 Received: by wyg8 with SMTP id 8so384688wyg.19 for ; Wed, 13 Jul 2011 13:01:02 -0700 (PDT) In-Reply-To: <4E1D9DFF.1090403@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 2011-07-13 at 16:30 +0300, Avi Kivity wrote: > On 07/09/2011 03:25 PM, Sasha Levin wrote: > > The patch raises the hard limit of VCPU count to 1024. > > > > This will allow developers to easily work on scalability > > and will allow users to test high VCPU setups easily without > > patching the kernel. > > > > To prevent possible issues with current setups, KVM_CAP_NR_VCPUS > > now returns the recommended VCPU limit (which is still 64) - this > > should be a safe value for everybody, while a new KVM_CAP_MAX_VCPUS > > returns the hard limit which is now 1024. > > > > Can 1024 vcpus even work without interrupt remapping? > I'm not sure. I've successfully tried it with 255 vcpus. > Looks like the patch will break coalesced mmio: > > static int coalesced_mmio_in_range(struct kvm_coalesced_mmio_dev *dev, > gpa_t addr, int len) > { > struct kvm_coalesced_mmio_zone *zone; > struct kvm_coalesced_mmio_ring *ring; > unsigned avail; > int i; > > /* Are we able to batch it ? */ > > /* last is the first free entry > * check if we don't meet the first used entry > * there is always one unused entry in the buffer > */ > ring = dev->kvm->coalesced_mmio_ring; > avail = (ring->first - ring->last - 1) % KVM_COALESCED_MMIO_MAX; > if (avail < KVM_MAX_VCPUS) { > /* full */ > return 0; > } > > I don't quite understand what KVM_MAX_VCPUS has to do with that if (). Shouldn't it check whether theres more than one buffer between first and last? What role does KVM_MAX_VCPUS play there? -- Sasha.