From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933458AbcE3PhL (ORCPT ); Mon, 30 May 2016 11:37:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36753 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932632AbcE3PhJ (ORCPT ); Mon, 30 May 2016 11:37:09 -0400 Date: Mon, 30 May 2016 18:37:05 +0300 From: "Michael S. Tsirkin" To: Jason Wang Cc: linux-kernel@vger.kernel.org, Eric Dumazet , davem@davemloft.net, netdev@vger.kernel.org, Steven Rostedt , brouer@redhat.com Subject: Re: [PATCH v5 0/2] skb_array: array based FIFO for skbs Message-ID: <20160530183455-mutt-send-email-mst@redhat.com> References: <1464000201-15560-1-git-send-email-mst@redhat.com> <574C0F05.1040500@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <574C0F05.1040500@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 30 May 2016 15:37:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > 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? -- MST