From: David Miller <davem@davemloft.net>
To: jasowang@redhat.com
Cc: mst@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
sasha.levin@oracle.com
Subject: Re: [PATCH net] virtio-net: fix the race between channels setting and refill
Date: Wed, 03 Jul 2013 16:59:45 -0700 (PDT) [thread overview]
Message-ID: <20130703.165945.721617006723749470.davem@davemloft.net> (raw)
In-Reply-To: <1372853752-41889-1-git-send-email-jasowang@redhat.com>
From: Jason Wang <jasowang@redhat.com>
Date: Wed, 3 Jul 2013 20:15:52 +0800
> Commit 55257d72bd1c51f25106350f4983ec19f62ed1fa (virtio-net: fill only rx queues
> which are being used) tries to refill on demand when changing the number of
> channels by call try_refill_recv() directly, this may race:
>
> - the refill work who may do the refill in the same time
> - the try_refill_recv() called in bh since napi was not disabled
>
> Which may led guest complain during setting channels:
>
> virtio_net virtio0: input.1:id 0 is not a head!
>
> Solve this issue by scheduling a refill work which can guarantee the
> serialization of refill.
>
> Cc: Sasha Levin <sasha.levin@oracle.com>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
Michael, please review.
Thanks.
next prev parent reply other threads:[~2013-07-03 23:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 12:15 [PATCH net] virtio-net: fix the race between channels setting and refill Jason Wang
2013-07-03 23:59 ` David Miller [this message]
2013-07-04 0:56 ` Asias He
2013-07-04 2:18 ` Rusty Russell
2013-07-04 8:23 ` Michael S. Tsirkin
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=20130703.165945.721617006723749470.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sasha.levin@oracle.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).