From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 660E7A04BA; Wed, 7 Oct 2020 10:43:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 488211B3C8; Wed, 7 Oct 2020 10:43:09 +0200 (CEST) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id E347F2B8C for ; Wed, 7 Oct 2020 10:43:06 +0200 (CEST) Received: by mail-wm1-f68.google.com with SMTP id q5so1425704wmq.0 for ; Wed, 07 Oct 2020 01:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qTskRDHvWsC9/WCLsmpxXB70Hm5itPxM67wPwlbQBEQ=; b=iNOEfLg3NxpkZeejUsqi4U9pmCoTAoXy6wJ63ct2cYXzolXfKyQXUAa4/yDU6pShN1 +G8SMbEo2+cRHI0xkipArZ9nNuWiENpDCtF7yv0BcnmD1bLA70N/FP5RDS2MInOveA6q JLBEXHr825qcCaWRo4yrm5JWk+KvaKDiHdzd5wbVmXKNHXsvpvTrmhajM8Dh2xEkXe9U ybM3Jk59of/tcqduCgNhbE8ztrvczY203Wj82NTp4RV5aG+Gn81URrTNhK4aObHJqbtd +fq8sNrj1JliCIyjW6iVO0HoU76xpEPJsqup2IqLhsX4xJiGNDdTB4lCl5iqWEWnGXf0 HRWg== 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:in-reply-to:user-agent; bh=qTskRDHvWsC9/WCLsmpxXB70Hm5itPxM67wPwlbQBEQ=; b=DZ45CiUTlGX6SA8O2q7mVw6+mh2Yo6gGs5uBDIwZQAo1UZxwRwnz/GYMGBCcec2YZI UYusvAwaFz1D8niR1zpt0veSfMFRtLKPF/35heWrKJOAPmJ+GcfzColc5HIgsfL0ozTY Oyg7CLUq4GB/ad1bNdYaCw3iGdewGbmofUQOcyLPrlM/FqtVRRgWJ1ihxDzYeObemzGC 33PKCV7AeT1FA0ZmKRbAzp80ytNppXSPa634shjWeGx9dGTBURk8I7HSbdT2XHZASpaP EYFF0QTiaR3rmgggPd1vdia52WpYhVg/DDnctYh5uSizwvMLOCZFOcIRZkxB3D3esHsv CbbA== X-Gm-Message-State: AOAM533bxVmdZs0qLxG5s9uitE4icFG4PM+J2pJ86WsUSNuduCEZck2G AmPlwrYUuubYU7dpZTnYeBfCUw== X-Google-Smtp-Source: ABdhPJyIzyXPJg0aTvMdDk7Xvt6Z4qsNgNzqfFLwpDNWjbHvRvTQktykgR+6jARHmMz3p2E20+gy5w== X-Received: by 2002:a1c:a184:: with SMTP id k126mr2051833wme.39.1602060185636; Wed, 07 Oct 2020 01:43:05 -0700 (PDT) Received: from 6wind.com (2a01cb0c0005a600345636f7e65ed1a0.ipv6.abo.wanadoo.fr. [2a01:cb0c:5:a600:3456:36f7:e65e:d1a0]) by smtp.gmail.com with ESMTPSA id x15sm2065594wrr.36.2020.10.07.01.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 01:43:04 -0700 (PDT) Date: Wed, 7 Oct 2020 10:43:04 +0200 From: Olivier Matz To: "Eads, Gage" Cc: "dev@dpdk.org" , "arybchenko@solarflare.com" , "Mcnamara, John" , "Kovacevic, Marko" Message-ID: <20201007084304.GN21395@platinum> References: <20200811211015.29704-1-gage.eads@intel.com> <20200914211153.6725-1-gage.eads@intel.com> <20200917142530.GU21395@platinum> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH v3] doc: add stack mempool guide 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Gage, On Mon, Sep 21, 2020 at 03:42:28PM +0000, Eads, Gage wrote: > Hi Olivier, > > > > > > +Stack Mempool Driver > > > +==================== > > > + > > > +**rte_mempool_stack** is a pure software mempool driver based on the > > > +``rte_stack`` DPDK library. A stack-based mempool is often better suited to > > > +packet-processing workloads than a ring-based mempool, since its LIFO > > behavior > > > +results in better temporal locality and a minimal memory footprint even if the > > > +mempool is over-provisioned. > > > > Would it make sense to give an example of a use-case where the stack > > driver should be used in place of the standard ring-based one? > > > > In most run-to-completion applications, the mbufs stay in per-core > > caches, so changing the mempool driver won't have a big impact. However, > > I suspect that for applications using a pipeline model (ex: rx on core0, > > tx on core1), the stack model would be more efficient. Is it something > > that you measured? If yes, it would be useful to explain this in the > > documentation. > > > > Good point, I was overlooking the impact of the per-core caches. I've seen data showing > better overall packet throughput with the stack mempool, and indeed that was a pipelined > application. How about this re-write? > > " > **rte_mempool_stack** is a pure software mempool driver based on the > ``rte_stack`` DPDK library. For run-to-completion workloads with sufficiently > large per-lcore caches, the mbufs will likely stay in the per-lcore caches and the > mempool type (ring, stack, etc.) will have a negligible impact on performance. However > a stack-based mempool is often better suited to pipelined packet-processing workloads > (which allocate and free mbufs on different lcores) than a ring-based mempool, since its > LIFO behavior results in better temporal locality and a minimal memory footprint even > if the mempool is over-provisioned. Users are encouraged to benchmark with multiple > mempool types to determine which works best for their specific application. > " Yes, this is clear, thanks! Olivier