From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755744AbbFQMXy (ORCPT ); Wed, 17 Jun 2015 08:23:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38972 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755185AbbFQMXn (ORCPT ); Wed, 17 Jun 2015 08:23:43 -0400 Date: Wed, 17 Jun 2015 14:23:39 +0200 From: Igor Mammedov To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, pbonzini@redhat.com Subject: Re: [PATCH 3/5] vhost: support upto 509 memory regions Message-ID: <20150617142339.6e6deb12@nial.brq.redhat.com> In-Reply-To: <20150617134848-mutt-send-email-mst@redhat.com> References: <20150616231201-mutt-send-email-mst@redhat.com> <20150617000056.481e4a96@igors-macbook-pro.local> <20150617083202-mutt-send-email-mst@redhat.com> <20150617092802.5c8d8475@igors-macbook-pro.local> <20150617092910-mutt-send-email-mst@redhat.com> <20150617105421.71751f44@nial.brq.redhat.com> <20150617110711-mutt-send-email-mst@redhat.com> <20150617123742.5c3fec30@nial.brq.redhat.com> <20150617123842-mutt-send-email-mst@redhat.com> <20150617134803.5a03d04e@nial.brq.redhat.com> <20150617134848-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Jun 2015 13:51:56 +0200 "Michael S. Tsirkin" wrote: > On Wed, Jun 17, 2015 at 01:48:03PM +0200, Igor Mammedov wrote: > > > > So far it's kernel limitation and this patch fixes crashes > > > > that users see now, with the rest of patches enabling performance > > > > not to regress. > > > > > > When I say regression I refer to an option to limit the array > > > size again after userspace started using the larger size. > > Is there a need to do so? > > Considering userspace can be malicious, I guess yes. I don't think it's a valid concern in this case, setting limit back from 509 to 64 will not help here in any way, userspace still can create as many vhost instances as it needs to consume memory it desires. > > > Userspace that cares about memory footprint won't use many slots > > keeping it low and user space that can't do without many slots > > or doesn't care will have bigger memory footprint. > > We really can't trust userspace to do the right thing though. >