From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by dpdk.org (Postfix) with ESMTP id 0718658F3 for ; Fri, 15 May 2015 15:43:46 +0200 (CEST) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NOE00LTJ8SUP470@mailout3.w1.samsung.com> for dev@dpdk.org; Fri, 15 May 2015 14:43:42 +0100 (BST) X-AuditID: cbfec7f5-f794b6d000001495-bc-5555f80ea034 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 9B.A3.05269.E08F5555; Fri, 15 May 2015 14:43:42 +0100 (BST) Received: from localhost ([106.109.131.58]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NOE00IKD8SUHU50@eusync2.samsung.com>; Fri, 15 May 2015 14:43:42 +0100 (BST) Date: Fri, 15 May 2015 16:43:33 +0300 From: Nikita Kalyazin To: Thomas Monjalon Message-id: <20150515134333.GA5857@kalyazin.rnd.samsung.ru> References: <1429720392-25345-1-git-send-email-huawei.xie@intel.com> <1430305884-9139-1-git-send-email-huawei.xie@intel.com> <1907109.z7RyHoHxuq@xps13> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-disposition: inline In-reply-to: <1907109.z7RyHoHxuq@xps13> X-Priority: 3 User-Agent: Mutt/1.5.23 (2014-03-12) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsVy+t/xK7p8P0JDDa4flrV492k7k0X7zLNM Fv9/vWK1+LJpOpsDi8fF/juMHr8WLGX1WLznJZPH+31X2QJYorhsUlJzMstSi/TtErgytt4q LnjOUfFn8UWWBsYO9i5GTg4JAROJxbuWMkHYYhIX7q1n62Lk4hASWMooMffFQlYI5yujxLmH X9lAqlgEVCVOb70D1M3BwSagJ3H6dDCIKSKgL9HWXgxSwSzgLNFx7ScriC0sECdxd8FUsF28 AtYSje0HWSBGzmaUuD73PytEQlDix+R7LCBzmAXUJaZMyYWYIy3x6O8MsF5OoPDLo59YIe7k lZjR/pQFxBYVUJG4MuEt+wRGwVlIJs1CmDQLyaQFjMyrGEVTS5MLipPSc430ihNzi0vz0vWS 83M3MUIC+usOxqXHrA4xCnAwKvHwnmANDRViTSwrrsw9xCjBwawkwvvrBVCINyWxsiq1KD++ qDQntfgQozQHi5I478xd70OEBNITS1KzU1MLUotgskwcnFINjKq+G2ysZ/f+jIh/nCHTtT1n l5+Ho3THSwHO0Fzv1f+bRUKe1EVK/KlOOWK52OJn0gVRoRlJtWKOSsxaPH8+bfddrqHu0n1t //OFO168OG1swH2Q4/ULh27702wLb+W1Nwq9WWX7Ymm80Fl+mSyFcPFW7ROPvCUn18XyfVq+ fMpbR5b/S32MlFiKMxINtZiLihMBsGDDZGQCAAA= Cc: dev@dpdk.org, mst@redhat.com Subject: Re: [dpdk-dev] [PATCH v2] vhost: flush used->idx update before reading avail->flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 13:43:46 -0000 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)? -- 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 > > Applied with following title, thanks > vhost: fix virtio freeze due to missed interrupt >