From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Fam Zheng <famz@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Ming Lei <tom.leiming@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>
Subject: Re: [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2
Date: Wed, 2 Jul 2014 12:01:59 +0200 [thread overview]
Message-ID: <20140702100159.GH5996@noname.str.redhat.com> (raw)
In-Reply-To: <53B3D579.3090500@redhat.com>
Am 02.07.2014 um 11:48 hat Paolo Bonzini geschrieben:
> Il 02/07/2014 11:39, Kevin Wolf ha scritto:
> >Am 02.07.2014 um 11:13 hat Paolo Bonzini geschrieben:
> >I don't think starting with that fast path as _the_ solution is a good
> >idea. It would essentially restrict dataplane to the scenarios that used
> >to work well in 2.0 - just look at what the block.c read/write functions
> >do: no image formats, (almost?) no block jobs, no 4k sector support, no
> >writethrough mode, no zero detection, no throttling, no nothing.
> >Anything we want to keep while using the fast path we would have to
> >duplicate there.
>
> You're entirely right (I wouldn't duplicate it though, I would just
> sacrifice it). But I think none of the bullets apply in maximum
> performance situations, and fast paths are okay as long as they are
> picked dynamically at run-time.
Fast paths are okay if there is no way to achieve the same performance
without them, but I'm not entirely convinced of that yet in our specific
case.
> >>>Another idea is to skip aio_notify() when we're sure the event loop
> >>>isn't blocked in g_poll(). Doing this is a thread-safe and lockless way
> >>>might be tricky though.
> >>
> >>Yes, good idea for 2.2 but not now.
> >
> >Isn't it a first approximation that it's unnecessary when we're already
> >running in the thread with the AIO main loop? (Which pretty much means
> >always with dataplane.) Or can it be required even when we don't switch
> >to a different thread?
>
> That's not even that much of an approximation. I think it's pretty
> much the definition of when it's unnecessary. Clever!
Probably not quite, because the AIO main loop thread might be doing
something else at the moment and would come back to handling things in
its main loop even without being notified.
But it's probably close enough in practice.
> An approximation is "it's unnecessary if we have the aio context
> lock taken". Which is also always the case with dataplane, but
> never with non-dataplane (the main loop bypasses
> aio_context_acquire/release). Adding rfifolock_is_owned is trivial.
Is the fix for the main loop as simple as just adding the acquire/
release pair, or does it involve more than that?
I would really prefer if the optimisations we apply for dataplane would
work even in the traditional case, improving the block layer as a whole
instead of just special cases.
Kevin
next prev parent reply other threads:[~2014-07-02 10:02 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-26 15:14 [Qemu-devel] [regression] dataplane: throughout -40% by commit 580b6b2aa2 Ming Lei
2014-06-26 15:29 ` Paolo Bonzini
2014-06-26 15:37 ` Ming Lei
2014-06-26 15:43 ` Paolo Bonzini
2014-06-26 15:47 ` Ming Lei
2014-06-26 15:57 ` Paolo Bonzini
2014-06-27 1:15 ` Ming Lei
2014-06-27 4:59 ` Paolo Bonzini
2014-06-27 6:23 ` Kevin Wolf
2014-06-27 7:35 ` Paolo Bonzini
2014-06-27 12:35 ` Ming Lei
2014-06-27 7:57 ` Ming Lei
2014-06-27 12:01 ` Stefan Hajnoczi
2014-06-27 12:21 ` Kevin Wolf
2014-06-27 14:50 ` Stefan Hajnoczi
2014-06-27 18:01 ` Ming Lei
2014-06-27 21:51 ` Paolo Bonzini
2014-06-28 9:58 ` Ming Lei
2014-06-30 8:08 ` Stefan Hajnoczi
2014-06-30 8:27 ` Ming Lei
2014-07-01 13:53 ` Ming Lei
2014-07-01 14:31 ` Stefan Hajnoczi
2014-07-01 14:49 ` Ming Lei
2014-07-01 16:49 ` Paolo Bonzini
2014-07-02 0:48 ` Ming Lei
2014-07-02 8:54 ` Stefan Hajnoczi
2014-07-02 9:13 ` Paolo Bonzini
2014-07-02 9:39 ` Kevin Wolf
2014-07-02 9:48 ` Paolo Bonzini
2014-07-02 10:01 ` Kevin Wolf [this message]
2014-07-02 10:23 ` Paolo Bonzini
2014-07-02 15:45 ` Ming Lei
2014-07-02 16:13 ` Ming Lei
2014-07-02 16:23 ` Paolo Bonzini
2014-07-02 16:27 ` Ming Lei
2014-07-02 16:38 ` Paolo Bonzini
2014-07-02 16:41 ` Ming Lei
2014-07-02 16:21 ` Paolo Bonzini
2014-07-03 4:54 ` Ming Lei
2014-07-03 10:29 ` Paolo Bonzini
2014-07-03 11:50 ` Ming Lei
2014-07-03 11:56 ` Paolo Bonzini
2014-07-03 12:09 ` Ming Lei
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=20140702100159.GH5996@noname.str.redhat.com \
--to=kwolf@redhat.com \
--cc=famz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@redhat.com \
--cc=tom.leiming@gmail.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;
as well as URLs for NNTP newsgroup(s).