From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 324B78E80 for ; Tue, 20 Oct 2015 16:30:22 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 20 Oct 2015 07:29:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,707,1437462000"; d="scan'208";a="830913887" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.65]) by orsmga002.jf.intel.com with SMTP; 20 Oct 2015 07:29:52 -0700 Received: by (sSMTP sendmail emulation); Tue, 20 Oct 2015 15:29:51 +0025 Date: Tue, 20 Oct 2015 15:29:51 +0100 From: Bruce Richardson To: Nikita Kalyazin Message-ID: <20151020142951.GA18496@bricha3-MOBL3> References: <1445350066-31818-1-git-send-email-n.kalyazin@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445350066-31818-1-git-send-email-n.kalyazin@samsung.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org, Dyasly Sergey Subject: Re: [dpdk-dev] [PATCH] vhost: call write barrier before used index update 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: Tue, 20 Oct 2015 14:30:22 -0000 On Tue, Oct 20, 2015 at 05:07:46PM +0300, Nikita Kalyazin wrote: > Descriptors that have been put into the used vring must be observable by > guest earlier than the new used index value. > Although compiler barrier serves well for Intel architectue here, the > proper cross-platform solution is to use write barrier before the used > index is updated. > > Signed-off-by: Nikita Kalyazin > --- Yes, but no! :-) This has been discussed a number of times before on list, and the consensus seems to be that the correct way to fix this is to introduce a set of specific barrier operations that insert the correct barrier type on each architecture, i.e. compiler barriers on IA, and full wmbs on architectures that require that. See discussion here: http://dpdk.org/dev/patchwork/patch/4293/ and in the thread here: http://dpdk.org/ml/archives/dev/2015-March/015202.html So correct problem statment, but unfortunately NAK for the implementation. Patches for general memory barrier implementation as described above welcome :-) Regards, /Bruce