Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753494AbbG2PBs (ORCPT ); Wed, 29 Jul 2015 11:01:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45143 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbbG2PBr (ORCPT ); Wed, 29 Jul 2015 11:01:47 -0400 Subject: Re: [PATCH 1/2] vhost: add ioctl to query nregions upper limit To: "Michael S. Tsirkin" , Igor Mammedov References: <1438180163-275465-1-git-send-email-imammedo@redhat.com> <1438180163-275465-2-git-send-email-imammedo@redhat.com> <20150729174229-mutt-send-email-mst@redhat.com> <20150729165351.16ae62ff@nial.brq.redhat.com> <20150729175434-mutt-send-email-mst@redhat.com> Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org From: Paolo Bonzini Message-ID: <55B8EAD7.70809@redhat.com> Date: Wed, 29 Jul 2015 17:01:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150729175434-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1015 Lines: 23 On 29/07/2015 16:56, Michael S. Tsirkin wrote: >>>> > > > Also, document our contract with legacy userspace: when running on an >>>> > > > old kernel, you get -1 and you can assume at least 64 slots. Since 0 >>>> > > > value's left unused, let's make that mean that the current userspace >>>> > > > behaviour (trial and error) is required, just in case we want it back. >>> > > >>> > > What's wrong with reading the module parameter value? It's there in >>> > > sysfs ... >> > for most cases it would work but distro doesn't have to mount >> > sysfs under /sys > If it wants to rewrite all userspace, sure it doesn't. I agree, on the other hand it doesn't seem far fetched to have a per-fd maximum in the future. So I think this patch is more future-proof. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/