public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 1/2] vhost: add ioctl to query nregions upper limit
Date: Wed, 29 Jul 2015 18:23:05 +0300	[thread overview]
Message-ID: <20150729181346-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <55B8EAD7.70809@redhat.com>

On Wed, Jul 29, 2015 at 05:01:43PM +0200, Paolo Bonzini wrote:
> 
> 
> 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

Possibly, but this calls for some kind of priveledge separation model,
where a priveledged app can set the per-fd limit while regular ones
can only read it. Sounds very complex. Let's see some of this code
first.

And I really think there are better ways to future proof it, e.g. teach
userspace to do error handling, revert adding a slot if one of the
components can't support it.

-- 
MST

  reply	other threads:[~2015-07-29 15:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29 14:29 [PATCH 0/2] vhost: add ioctl to query nregions limit and rise default limit Igor Mammedov
2015-07-29 14:29 ` [PATCH 1/2] vhost: add ioctl to query nregions upper limit Igor Mammedov
2015-07-29 14:43   ` Michael S. Tsirkin
2015-07-29 14:53     ` Igor Mammedov
2015-07-29 14:56       ` Michael S. Tsirkin
2015-07-29 15:01         ` Paolo Bonzini
2015-07-29 15:23           ` Michael S. Tsirkin [this message]
2015-07-29 14:29 ` [PATCH 2/2] vhost: increase default limit of nregions from 64 to 509 Igor Mammedov
2015-07-29 15:28   ` Michael S. Tsirkin
2015-07-30  6:26     ` Igor Mammedov
2015-07-30  6:33       ` Michael S. Tsirkin
2015-07-30 11:58         ` Igor Mammedov
2015-07-30 15:08         ` Igor Mammedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150729181346-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox