DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Nikita Kalyazin <n.kalyazin@samsung.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] vhost: flush used->idx update before reading avail->flags
Date: Fri, 15 May 2015 17:23:35 +0200	[thread overview]
Message-ID: <20150515172230-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <20150515134333.GA5857@kalyazin.rnd.samsung.ru>

On Fri, May 15, 2015 at 04:43:33PM +0300, Nikita Kalyazin wrote:
> Hi,
> 
> 
> Maybe I missed a part of the discussion, but is there any special purpose for using rte_mb (both read and write fence) here rather than rte_wmb (write fence only)?

The fence is between write of used->idx and read of avail->flags, so
rte_wmb won't do anything useful.

> -- 
> 
> Best regards,
> 
> Nikita Kalyazin,
> n.kalyazin@samsung.com
> 
> Software Engineer
> CE OS Group
> Samsung R&D Institute Russia
> Tel: +7 (495) 797-25-00 #3816
> Tel: +7 (495) 797-25-03
> Office #1501, 12-1, Dvintsev str.,
> Moscow, 127018, Russia
> 
> On Wed, May 13, 2015 at 12:46:30PM +0200, Thomas Monjalon wrote:
> > 2015-04-29 19:11, Huawei Xie:
> > > update of used->idx and read of avail->flags could be reordered.
> > > memory fence should be used to ensure the order, otherwise guest could see a stale used->idx value after it toggles the interrupt suppression flag.
> > > After guest sets the interrupt suppression flag, it will check if there is more buffer to process through used->idx. If it sees a stale value, it will exit the processing while host willn't send interrupt to guest.
> > > 
> > > Signed-off-by: Huawei Xie <huawei.xie@intel.com>
> > 
> > Applied with following title, thanks
> > 	vhost: fix virtio freeze due to missed interrupt
> > 

  reply	other threads:[~2015-05-15 15:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 16:33 [dpdk-dev] [PATCH] " Huawei Xie
2015-04-23 13:57 ` Luke Gorrie
2015-04-24  1:01 ` Linhaifeng
2015-04-24  2:40   ` Xie, Huawei
2015-04-24  7:27   ` Luke Gorrie
2015-06-09  7:04     ` Linhaifeng
2015-06-09  7:45       ` Luke Gorrie
2015-06-09  8:46       ` Michael S. Tsirkin
2015-06-09 13:34         ` Xie, Huawei
2015-06-10  2:36           ` Linhaifeng
2015-06-10  8:30         ` Luke Gorrie
2015-06-11  0:50           ` Linhaifeng
2015-04-29 11:11 ` [dpdk-dev] [PATCH v2] " Huawei Xie
2015-05-13 10:46   ` Thomas Monjalon
2015-05-15 13:43     ` Nikita Kalyazin
2015-05-15 15:23       ` Michael S. Tsirkin [this message]
2015-05-18  6:18         ` Nikita Kalyazin

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=20150515172230-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=dev@dpdk.org \
    --cc=n.kalyazin@samsung.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).