Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932852AbdC2Vrv (ORCPT ); Wed, 29 Mar 2017 17:47:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35996 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932201AbdC2Vrf (ORCPT ); Wed, 29 Mar 2017 17:47:35 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A7F1D8047D Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=mst@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A7F1D8047D Date: Thu, 30 Mar 2017 00:47:33 +0300 From: "Michael S. Tsirkin" To: Jason Wang Cc: Pankaj Gupta , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 7/8] vhost_net: try batch dequing from skb array Message-ID: <20170330004654-mutt-send-email-mst@kernel.org> References: <1490069087-4783-1-git-send-email-jasowang@redhat.com> <1490069087-4783-8-git-send-email-jasowang@redhat.com> <20170322155111-mutt-send-email-mst@kernel.org> <674632255.8752546.1490784387956.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 29 Mar 2017 21:47:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1110 Lines: 37 On Wed, Mar 29, 2017 at 06:53:27PM +0800, Jason Wang wrote: > > > On 2017年03月29日 18:46, Pankaj Gupta wrote: > > Hi Jason, > > > > > On 2017年03月23日 13:34, Jason Wang wrote: > > > > > > > > > > +{ > > > > > > + if (rvq->rh != rvq->rt) > > > > > > + goto out; > > > > > > + > > > > > > + rvq->rh = rvq->rt = 0; > > > > > > + rvq->rt = skb_array_consume_batched_bh(rvq->rx_array, rvq->rxq, > > > > > > + VHOST_RX_BATCH); > > > > > A comment explaining why is is -bh would be helpful. > > > > Ok. > > > > > > > > Thanks > > > Rethink about this. It looks like -bh is not needed in this case since > > > no consumer run in bh. > > In that case do we need other variants of "ptr_ring_consume_batched_*()" functions. > > Are we planning to use them in future? > > I think we'd better keep them, since it serves as helpers. You can see that > not all the helpers in ptr_ring has real users, but they were prepared for > the future use. > > Thanks Makes sense for basic building blocks but I'm not sure we need to do it for all APIs. > > > > > Thanks > > >