From: "Michael S. Tsirkin" <mst@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Krishna Kumar <krkumar2@in.ibm.com>,
kvm@vger.kernel.org, Pawel Moll <pawel.moll@arm.com>,
Wang Sheng-Hui <shhuiw@gmail.com>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
virtualization@lists.linux-foundation.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
Sasha Levin <levinsasha928@gmail.com>,
Amit Shah <amit.shah@redhat.com>
Subject: Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout
Date: Thu, 24 Nov 2011 09:11:22 +0200 [thread overview]
Message-ID: <20111124070728.GH29994@redhat.com> (raw)
In-Reply-To: <87ty5uxso3.fsf@rustcorp.com.au>
On Thu, Nov 24, 2011 at 11:06:44AM +1030, Rusty Russell wrote:
> Because I suspect we'll be different enough anyway, once we change the
> way we allocate the ring, and write the alignment.
Well, it'd be easy to just add pa_high.
> It'll be *clearer* to have two completely separate paths than to fill
> with if() statements.
Well, look at my patches. See how each new feature basically adds *one*
if statement.
Yes, we could declare all existing features to be required,
this is what you are advocating. But in a couple of years
more if statements have accumulated and we still don't have
a flying car. Meanwhile the driver has a huge legacy section
which is a huge pain to maintain.
> And a rewrite won't hurt the driver.
Wow. Is everyone going for the rewrite these days?
After a lot of work we will be back at the point where we left,
with a minor tweak to enable a huge number of slow devices.
Meanwhile we have no time to work on real problems,
such as ring fragmentation that Avi pointed out,
support for very large requests.
And yes it will hurt, it will hurt bisectability and testability.
What you propose is a huge patch that just changes all of it.
If there's a breakage, bisect just points at a rewrite.
What I would like to see is incremental patches. So I would like to
1. Split driver config from common config
2. Split isr/notifications out too
3. Copy config in MMIO
4. Add a new config
5. Add length checks
6. Add 64 bit features
7. Add alignment programming
At each point we can bisect. It worked well for event index, qemu had a
flag to turn it off, each time someone came in and went 'maybe it's
event index' we just tested without.
> But to be honest I don't really care about the Linux driver: we're
> steeped in this stuff and we'll get it right.
Maybe. What about windows drivers?
> But I'm *terrified* of making the spec more complex;
All you do is move stuff around. Why do you think it simplifies the spec
so much?
> implementations will get it wrong.
Just to clarify: you assume that if virtio pci spec is changed, then
there will be many more new implementations than existing ones, so it is
worth it to make life (temporarily, for several short years) harder for
all the existing ones?
Look at the qemu side for example. The way I proposed - with optional
capabilities, each one with a separate fallback - the change can be
implemented very gradually. Each step will be bisectable, and testable.
> I *really* want to banish the legacy stuff to an appendix where noone will
> ever know it's there :)
This does not make life easy for implementations as they
need to implement it anyway. What makes life easy is
making new features optional, so you pick just what you like.
For example, we might want to backport some new feature into
rhel6.X at some point. I would like the diff to be small,
and easily understandable in its impact.
--
MST
next prev parent reply other threads:[~2011-11-24 7:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 18:36 [PATCHv3 RFC] virtio-pci: flexible configuration layout Michael S. Tsirkin
2011-11-23 2:32 ` Rusty Russell
2011-11-23 8:46 ` Michael S. Tsirkin
2011-11-23 15:34 ` Michael S. Tsirkin
2011-11-24 0:36 ` Rusty Russell
2011-11-24 6:24 ` Michael S. Tsirkin
2011-11-24 7:11 ` Michael S. Tsirkin [this message]
2011-11-28 0:55 ` Rusty Russell
2011-11-28 8:41 ` Michael S. Tsirkin
2011-11-29 23:28 ` Rusty Russell
2011-11-30 7:18 ` Michael S. Tsirkin
2011-11-28 9:15 ` Sasha Levin
2011-11-29 23:40 ` Rusty Russell
2011-11-30 8:14 ` Michael S. Tsirkin
2011-11-30 13:12 ` Sasha Levin
2011-12-01 2:42 ` Rusty Russell
2011-11-23 8:49 ` Michael S. Tsirkin
2011-11-23 9:38 ` Sasha Levin
2011-11-24 1:07 ` Rusty Russell
2011-11-23 9:44 ` Sasha Levin
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=20111124070728.GH29994@redhat.com \
--to=mst@redhat.com \
--cc=aik@ozlabs.ru \
--cc=amit.shah@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=krkumar2@in.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pawel.moll@arm.com \
--cc=rusty@rustcorp.com.au \
--cc=shhuiw@gmail.com \
--cc=virtualization@lists.linux-foundation.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).