From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423564AbcEaC3b (ORCPT ); Mon, 30 May 2016 22:29:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52411 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161732AbcEaC33 (ORCPT ); Mon, 30 May 2016 22:29:29 -0400 Subject: Re: [PATCH v5 0/2] skb_array: array based FIFO for skbs To: "Michael S. Tsirkin" References: <1464000201-15560-1-git-send-email-mst@redhat.com> <574C0F05.1040500@redhat.com> <20160530183455-mutt-send-email-mst@redhat.com> Cc: linux-kernel@vger.kernel.org, Eric Dumazet , davem@davemloft.net, netdev@vger.kernel.org, Steven Rostedt , brouer@redhat.com From: Jason Wang Message-ID: <574CF703.9030200@redhat.com> Date: Tue, 31 May 2016 10:29:23 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160530183455-mutt-send-email-mst@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.32]); Tue, 31 May 2016 02:29:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016年05月30日 23:37, Michael S. Tsirkin wrote: > On Mon, May 30, 2016 at 05:59:33PM +0800, Jason Wang wrote: >> >> On 2016年05月23日 18:43, Michael S. Tsirkin wrote: >>> This is in response to the proposal by Jason to make tun >>> rx packet queue lockless using a circular buffer. >>> My testing seems to show that at least for the common usecase >>> in networking, which isn't lockless, circular buffer >>> with indices does not perform that well, because >>> each index access causes a cache line to bounce between >>> CPUs, and index access causes stalls due to the dependency. >> I change tun to use skb array, looks like it can give about 5% more faster >> than skb ring. > OK and skb ring is 9% faster than the linked list, so together > this is a 14% speedup? Right. > >> And we usually don't need touch bhs during consume and produce (e.g for the >> case of tun). >> >> Thanks > Maybe I'll drop it in v6 then ... > Could you post the full tun patchset please? > Since it needs no bh versions of produce/consume, maybe you can post v6 first, then I can post the tun patches?