From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luke Gorrie Subject: Re: [PATCH] vhost: flush used->idx update before reading avail->flags Date: Fri, 24 Apr 2015 09:27:19 +0200 Message-ID: References: <1429720392-25345-1-git-send-email-huawei.xie@intel.com> <553995DB.4000801@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "dev-VfR2kkLFssw@public.gmane.org" , "Michael S. Tsirkin" To: Linhaifeng Return-path: In-Reply-To: <553995DB.4000801-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On 24 April 2015 at 03:01, Linhaifeng wrote: > If not add memory fence what would happen? Packets loss or interrupt > loss?How to test it ? > You should be able to test it like this: 1. Boot two Linux kernel (e.g. 3.13) guests. 2. Connect them via vhost switch. 3. Run continuous traffic between them (e.g. iperf). I would expect that within a reasonable timeframe (< 1 hour) one of the guests' network interfaces will hang indefinitely due to a missed interrupt. You won't be able to reproduce this using DPDK guests because they are not using the same interrupt suppression method. This is a serious real-world problem. I wouldn't deploy the vhost implementation without this fix. Cheers, -Luke