Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756026AbdC2KyL (ORCPT ); Wed, 29 Mar 2017 06:54:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44440 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752442AbdC2Kxg (ORCPT ); Wed, 29 Mar 2017 06:53:36 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 26EA58FCE1 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jasowang@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 26EA58FCE1 Subject: Re: [PATCH net-next 7/8] vhost_net: try batch dequing from skb array To: Pankaj Gupta 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> Cc: "Michael S. Tsirkin" , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Jason Wang Message-ID: Date: Wed, 29 Mar 2017 18:53:27 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <674632255.8752546.1490784387956.JavaMail.zimbra@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 29 Mar 2017 10:53:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 853 Lines: 32 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 > >> Thanks >>