From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 006FB2BB5 for ; Fri, 12 Jan 2018 15:01:34 +0100 (CET) Received: by mail-wm0-f42.google.com with SMTP id i11so11975600wmf.4 for ; Fri, 12 Jan 2018 06:01:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=LfI6CeLp4lcCPonqqZLopNWmQt905ELmD9a4QbFE+18=; b=f6KOPzbcs6zgXglmltOjH06TopENgm5CrKCppm5xjL5TzsdjxUr3MT4FpA81DFMLAQ QrDPbvegt9Ewk2dbZ1eOOdkBrw8mbjeKVfCy3AeffoDvog2DfR/kYmKiMreQAGsUiB1z aeIJNrYTS+tpeZuCrVaOMFliJYAmHF7vyhFUg7tYDPB8RB4nnj84gDwoEQ2MCMMFfXQn xA57vw4hYGJ88MSavOTnop2/Jr/qAPCdBw+L02V24NH6dfCze/UdlXKeXUJwhmnjkPC7 +4rwZSL8rRV8maZhSbYqxZcvyG8Ido7rmtKWCZ2kMP6hJvnAjj/dteCo9Jv6zF9PWRaD YW2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=LfI6CeLp4lcCPonqqZLopNWmQt905ELmD9a4QbFE+18=; b=gSG1EjsoXfNIFx5wvbwzJBwQF7coimqaslYc+kN3MbupkREEnS/OOKp1Qrk9sTdIkv Ld+FZRLYUxbnhWf6kTIAwhG9YciOwS+N18yNJpznSQegdOQVAoO4lSf6pg7LLtPUhALv Ky8LE8XYmMH4sYvloXCLH1fH8IuJ5FdlZ1WsNu58VEVDly2hOHJL4/jVqc+oFmG0gHt2 0PJNdRJZCnIzzH2gNV8WofYFZNgM+fwTRQIHd+mUWL25Ja3FHmjnvF/vT4mq2xh+rmRe LgfBRBkioaxt5IZKGaGBKt6pUM2weJOurfnIVIlx+gbtISTndO4XynBdRkOiSZJwKW4Z nKEQ== X-Gm-Message-State: AKwxytcJBNUKFFbKbkrua6Xlvivn5tx4XB8MnOhFAL6gkggvnm2ob16y 4haxFIHKQq53p9d1IzhYy75fMQ== X-Google-Smtp-Source: ACJfBoscBqVJtbOPLT87ilb8flH9v+s4miGZtpcUcARcLeBXx8mpaqKTqBU2ppiePyVwa0/H7k0gUQ== X-Received: by 10.80.169.67 with SMTP id m3mr15615171edc.274.1515765694582; Fri, 12 Jan 2018 06:01:34 -0800 (PST) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id g61sm12735566edd.48.2018.01.12.06.01.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jan 2018 06:01:33 -0800 (PST) Date: Fri, 12 Jan 2018 15:01:21 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Matan Azrad Cc: "dev@dpdk.org" Message-ID: <20180112140121.ps3qfcikaoz5qvxq@bidouze.vm.6wind.com> References: <1513703669-29363-1-git-send-email-matan@mellanox.com> <1513703669-29363-4-git-send-email-matan@mellanox.com> <20180112102855.fmfggiaxutje5s4t@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v3 3/3] net/failsafe: improve Rx sub-devices iteration X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2018 14:01:35 -0000 On Fri, Jan 12, 2018 at 01:29:17PM +0000, Matan Azrad wrote: > Hi Gaetan > > From: Gaëtan Rivet, Friday, January 12, 2018 12:29 PM > > Hi Matan, > > > > The other commits make sense to me so no issue there. > > I'm just surprised by this one so a quick question. > > > > On Tue, Dec 19, 2017 at 05:14:29PM +0000, Matan Azrad wrote: > > > Connecting the sub-devices each other by cyclic linked list can help > > > to iterate over them by Rx burst functions because there is no need to > > > check the sub-devices ring wraparound. > > > > > > Create the aforementioned linked-list and change the Rx burst > > > functions iteration accordingly. > > > > I'm surprised that a linked-list iteration, with the usual dereferencing, is > > better than doing some integer arithmetic. > > This memory references are the same as the previous code because in the new code the linked list elements are still in continuous memory, so probably the addresses stay in the cache. > The removed calculations and wraparound branch probably caused to the performance gain. > > > Maybe the locality of the referenced data helps. > > > Sure. This means that the sub_device definition is critical for the datapath. It probably goes beyond a cache-line and could be optimized. > > > Anyway, were you able to count the cycles gained by this change? It might be > > interesting to do a measure with a CPU-bound bench, such as with a dummy > > device under the fail-safe (ring or such). MLX devices use a lot of PCI > > bandwidth, so the bottleneck could be masked in a physical setting. > > > > No comments otherwise, if you are sure that this is a performance gain, the > > implementation seems ok to me. > > Yes, I checked it and saw the little gain obviously. > (just run the test with and without this patch and saw the statistics). Oh I'm sure you checked, I just wanted to make sure you properly considered the methodology. Acked-by: Gaetan Rivet -- Gaëtan Rivet 6WIND