From: Stefan Hajnoczi Subject: Re: [PATCH] kvm: add detail error message when fail to add ioeventfd Date: Thu, 23 May 2013 09:46:07 +0200 Message-ID: <20130523074607.GA2921@stefanha-thinkpad.redhat.com> References: <1369198655-25156-1-git-send-email-akong@redhat.com> <20130522093227.GB30148@stefanha-thinkpad.redhat.com> <20130522134821.GB2051@t430s.nay.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: gleb@redhat.com, kvm@vger.kernel.org, qemu-devel@nongnu.org To: Amos Kong Return-path: Received: from mail-wg0-f54.google.com ([74.125.82.54]:48097 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756577Ab3EWHqM (ORCPT ); Thu, 23 May 2013 03:46:12 -0400 Received: by mail-wg0-f54.google.com with SMTP id j13so512065wgh.9 for ; Thu, 23 May 2013 00:46:11 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130522134821.GB2051@t430s.nay.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, May 22, 2013 at 09:48:21PM +0800, Amos Kong wrote: > On Wed, May 22, 2013 at 11:32:27AM +0200, Stefan Hajnoczi wrote: > > On Wed, May 22, 2013 at 12:57:35PM +0800, Amos Kong wrote: > > > I try to hotplug 28 * 8 multiple-function devices to guest with > > > old host kernel, ioeventfds in host kernel will be exhausted, then > > > qemu fails to allocate ioeventfds for blk/nic devices. > > > > > > It's better to add detail error here. > > > > > > Signed-off-by: Amos Kong > > > --- > > > kvm-all.c | 4 ++++ > > > 1 files changed, 4 insertions(+), 0 deletions(-) > > > > It would be nice to make kvm bus scalable so that the hardcoded > > in-kernel I/O device limit can be lifted. > > I had increased kernel NR_IOBUS_DEVS to 1000 (a limitation is needed for > security) in last Mar, and make resizing kvm_io_range array dynamical. The maximum should not be hardcoded. File descriptor, maximum memory, etc are all controlled by rlimits. And since ioeventfds are file descriptors they are already limited by the maximum number of file descriptors. Why is there a need to impose a hardcoded limit? Stefan