From: Sasha Levin <levinsasha928@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Asias He <asias.hejun@gmail.com>,
Pekka Enberg <penberg@kernel.org>,
Cyrill Gorcunov <gorcunov@gmail.com>,
Prasad Joshi <prasadjoshi124@gmail.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH 1/3] kvm tools: Make virtio-net kvm__irq_line thread safe
Date: Fri, 29 Apr 2011 19:52:02 +0300 [thread overview]
Message-ID: <1304095922.10069.29.camel@lappy> (raw)
In-Reply-To: <20110429102245.GB22919@elte.hu>
On Fri, 2011-04-29 at 12:22 +0200, Ingo Molnar wrote:
> If that is so then indeed the right approach might be to signal the guest every
> time we manage to readv() something - there might not come any other packet for
> a long time. But the reason is not some 'erroneous state' - all state is
> perfectly fine, this is simply a basic property of the event loop that the rx
> thread implements ...
My idea as for 'erroneous state' was as follows:
We have 2 virt queues: one for RX and one for TX, each on it's own
thread.
RX Thread:
- Runs readv() and reads data.
- Calls virt_queue__set_used_elem() which starts updating the RX virt
queue.
TX Thread:
- Runs readv() and reads data.
- Calls and returns from virt_queue__set_used_elem().
- Calls kvm__irq_line().
At this point, The RX queue state is being updated but since the IRQ was
signaled (same IRQ for both TX and RX) the guest virtio-net checks the
RX queue and finds a virt queue that wasn't fully updated.
--
Sasha.
next prev parent reply other threads:[~2011-04-29 16:52 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 6:36 [PATCH 1/3] kvm tools: Make virtio-net kvm__irq_line thread safe Asias He
2011-04-29 6:36 ` [PATCH 2/3] kvm tools: Make virtio-console " Asias He
2011-04-29 6:44 ` Ingo Molnar
2011-04-29 6:36 ` [PATCH 3/3] kvm tools: Make virtio-blk " Asias He
2011-04-29 6:44 ` Ingo Molnar
2011-04-29 6:55 ` Pekka Enberg
2011-04-29 7:26 ` Asias He
2011-04-29 7:55 ` Pekka Enberg
2011-04-29 8:29 ` Sasha Levin
2011-04-29 6:46 ` [PATCH 1/3] kvm tools: Make virtio-net " Ingo Molnar
2011-04-29 6:52 ` Pekka Enberg
2011-04-29 7:13 ` Asias He
2011-04-29 7:15 ` Pekka Enberg
2011-04-29 7:38 ` Asias He
2011-04-29 7:45 ` Ingo Molnar
2011-04-29 7:53 ` Sasha Levin
2011-04-29 10:02 ` Cyrill Gorcunov
2011-04-29 10:37 ` Pekka Enberg
2011-04-29 10:47 ` Cyrill Gorcunov
2011-04-29 10:22 ` Ingo Molnar
2011-04-29 16:52 ` Sasha Levin [this message]
2011-04-29 20:39 ` Ingo Molnar
2011-04-29 7:30 ` Ingo Molnar
2011-04-29 7:47 ` Asias He
2011-04-29 10:32 ` Ingo Molnar
2011-04-29 10:42 ` Pekka Enberg
2011-04-29 17:43 ` Pekka Enberg
2011-04-29 19:59 ` Ingo Molnar
2011-04-30 7:44 ` Pekka Enberg
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=1304095922.10069.29.camel@lappy \
--to=levinsasha928@gmail.com \
--cc=asias.hejun@gmail.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
--cc=prasadjoshi124@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.