From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 412025F25 for ; Tue, 27 Jan 2015 10:58:33 +0100 (CET) Received: by mail-wg0-f42.google.com with SMTP id x13so13815680wgg.1 for ; Tue, 27 Jan 2015 01:58:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=SIJvTndDtSqjr5Qyrl11dZZH+uR+004nDTGGEQpc6ww=; b=Y3dsEEDkRujkeSs53Fokg+FXnBBSBwi0QZGiG3Flb2jhKt1JR6nNzVc2+7NjHxcs6b BpBhOyQobUzVbop/cOPUoBZqT4GS53smzS4o7wrva+TK1oYlGoqsKSXgPOLDqkhcLURH jOyd+9CoROBXMuZIcRECCrlzsYTLzLZIiFCozz2YDzM0ShqvaVQdVc5pfShIEZSNy4Je FYqbFpOLXBEnnCf5YxxQc0jbMuU7/W575p3pUq87NqtFDYhudadLTBaX1UqalbJp2ml2 8bD6TQSO39v5RHFtG6zl10GvY1PB2TXYKmG6wkCDaRab2qY1bb/xUbLh0u6XO6ctXyLW aj1A== X-Gm-Message-State: ALoCoQlKkqqm08gXzK5BhNquhSAFgG50a4ugBdmDcKM+XgF0fkfRwvC/7VeerSCQCw5PkBK37eFh X-Received: by 10.194.110.69 with SMTP id hy5mr637131wjb.121.1422352713073; Tue, 27 Jan 2015 01:58:33 -0800 (PST) Received: from uryu.home.lan ([109.231.227.156]) by mx.google.com with ESMTPSA id hz9sm1119132wjb.17.2015.01.27.01.58.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jan 2015 01:58:32 -0800 (PST) Date: Tue, 27 Jan 2015 09:58:31 +0000 From: Stephen Hemminger To: "Xie, Huawei" Message-ID: <20150127095831.1572b67a@uryu.home.lan> In-Reply-To: References: <1421298930-15210-1-git-send-email-changchun.ouyang@intel.com> <1422326164-13697-1-git-send-email-changchun.ouyang@intel.com> <1422326164-13697-3-git-send-email-changchun.ouyang@intel.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 02/24] virtio: Use weaker barriers 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, 27 Jan 2015 09:58:33 -0000 > I recall our original code is virtio_wmb(). > Use store fence to ensure all updates to entries before updating the index. > Why do we need virtio_rmb() here and add virtio_wmb after vq_update_avail_idx()? Store fence is unnecessary, Intel CPU's are cache coherent, please read the virtio Linux ring header file for explanation. A full fence WMB is more expensive and causes CPU stall > > vq->vq_ring.avail->idx = vq->vq_avail_idx; > > } > > > > @@ -255,7 +264,7 @@ static inline void > > virtqueue_notify(struct virtqueue *vq) > > { > > /* > > - * Ensure updated avail->idx is visible to host. mb() necessary? > > + * Ensure updated avail->idx is visible to host. > > * For virtio on IA, the notificaiton is through io port operation > > * which is a serialization instruction itself. > > */ > > -- > > 1.8.4.2 >