From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Joao Martins <joao.m.martins@oracle.com>
Cc: Juergen Gross <jgross@suse.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Ankur Arora <ankur.a.arora@oracle.com>,
Annie Li <annie.li@oracle.com>,
xen-devel@lists.xenproject.org,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: Feature control on PV devices
Date: Mon, 18 Sep 2017 15:59:49 -0400 [thread overview]
Message-ID: <20170918195949.GD32401@char.us.oracle.com> (raw)
In-Reply-To: <9721dd45-9e36-acbe-f5b8-020f5da36d01@oracle.com>
On Thu, Sep 14, 2017 at 05:08:18PM +0100, Joao Martins wrote:
> [ Realized that I didn't CC the maintainers,
> so doing that now, +Linux folks +PV interfaces czar
> Sorry for the noise! ]
>
> On 09/08/2017 09:49 AM, Joao Martins wrote:
> > [Forgot two important details regarding Xenbus states]
> > On 09/07/2017 05:53 PM, Joao Martins wrote:
> >> Hey!
> >>
> >> We wanted to brought up this small proposal regarding the lack of
> >> parameterization on PV devices on Xen.
> >>
> >> Currently users don't have a way for enforce and control what
> >> features/queues/etc the backend provides. So far there's only global parameters
> >> on backends, and specs do not mention anything in this regard.
How would this scale with say FreeBSD backends? And I am assuming you are
also thinking about device driver backends - where you can't easily
get access to the backend and change the SysFS parameters (if they have
it all)?
> >>
> >> The most obvious example is netback/blkback max_queues module parameter where it
> >> sets the limit the maximum queues for all devices which is not that flexible.
> >> Other examples include controlling offloads visible by the NIC (e.g. disabling
> >> checksum offload, disabling scather-gather), others more about I/O path (e.g.
> >> disable blkif indirect descriptors, limit number of pages for the ring), or less
> >> grant usage by minimizing number of queues/descriptors.
> >>
> >> Of course there could be more examples, as this seems to be ortoghonal to the
> >> kinds of PV backends we have. And seems like all features appear to be published
> >> on the same xenbus state?
> >>
> >> The idea to address this would be very simple:
> >>
> >> - Toolstack when initializing device paths, writes additional entries in the
> >> form of 'request-<feature-name>' = <feature-value>. These entries are only
> >> visible by the backend and toolstack;
> >>
> > And after that we switch the device state to XenbusStateInitialising as usual.
> >
> >>
> >> - Backend reads this entries and uses <feature-value> as the value of
> >> <feature-name>, which will then be visible on the frontend.
> >>
> > And after that we switch state to XenbusStateInitWait as usual. No changes are
> > involved in xenbus state changes other than reading what the toolstack had
> > written in "request-*" and seed accordingly. Backends without support would
> > simply ignore these new entries.
> >
> >> [ Removal of the 'request-*' xenstore entries could represent a feedback look
> >> that the backend indeed read and used the value. Or else it could simply be
> >> ignored. ]
> >>
> >> And that's it.
> >>
> >> In pratice user would do: E.g.
> >>
> >> domain.cfg:
> >> ...
> >> name = "guest"
> >> kernel = "bzImage"
> >> vif = ["bridge=br0,queues=2"]
> >> disk = [
> >> "format=raw,vdev=hda,access=rw,backendtype=phy,target=/dev/HostVG/XenGuest2,queues=1,max-ring-page-order=0"
> >> ]
> >> ...
> >>
> >> Toolstack writes:
> >>
> >> /local/domain/0/backend/vif/8/0/request-multi-queue-max-queues = 2
> >> /local/domain/0/backend/vbd/8/51713/request-multi-queue-max-queues = 2
> >> /local/domain/0/backend/vbd/8/51713/request-max-ring-page-order = 0
> >
> > /local/domain/0/backend/vbd/8/51713/state = 1 (XenbusStateInitialising)
> >
> >>
> >> Backends reads and seeds with (and assuming it passes backend validation ofc):
> >>
> >> /local/domain/0/backend/vif/8/0/multi-queue-max-queues = 2
> >> /local/domain/0/backend/vbd/8/51713/multi-queue-max-queues = 2
> >> /local/domain/0/backend/vbd/8/51713/max-ring-page-order = 0
> >>
> > /local/domain/0/backend/vbd/8/51713/state = 2 (XenbusStateInitWait)
> >
> >> The XL configuration entry for controlling these tunable are just examples it's
> >> not clear the general preference for this. An alternative could be:
> >>
> >> vif = ["bridge=br0,features=queues:2\\;max-ring-page-order:0"]
> >>
> >> Which lets us have more generic feature control, without sticking to particular
> >> features names.
> >>
> >> Naturally libvirt could be a consumer of this (as it already has the 'queues'
> >> and host 'tso4', 'tso6', etc in their XML schemas)
> >>
> >> Thoughts? Do folks think the correct way of handling this?
> >>
> >> Cheers,
> >> Joao
> >>
> >> [0] https://github.com/qemu/qemu/blob/master/hw/net/virtio-net.c#L2102
> >>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-09-19 14:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-07 16:53 Feature control on PV devices Joao Martins
2017-09-08 8:49 ` Joao Martins
2017-09-14 16:08 ` Joao Martins
2017-09-18 19:59 ` Konrad Rzeszutek Wilk [this message]
2017-09-19 15:32 ` Joao Martins
2017-09-14 16:10 ` Wei Liu
2017-09-14 16:18 ` Joao Martins
2017-09-15 11:19 ` Wei Liu
2017-09-15 11:34 ` Juergen Gross
2017-09-15 12:46 ` Wei Liu
2017-09-15 13:56 ` Joao Martins
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=20170918195949.GD32401@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=ankur.a.arora@oracle.com \
--cc=annie.li@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=joao.m.martins@oracle.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).