From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id E90261B217 for ; Mon, 6 Nov 2017 10:25:45 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 06 Nov 2017 01:25:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,351,1505804400"; d="scan'208";a="146400248" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.32]) by orsmga004.jf.intel.com with SMTP; 06 Nov 2017 01:25:42 -0800 Received: by (sSMTP sendmail emulation); Mon, 06 Nov 2017 09:25:42 +0000 Date: Mon, 6 Nov 2017 09:25:41 +0000 From: Bruce Richardson To: Mike Stolarchuk Cc: dev@dpdk.org Message-ID: <20171106092541.GA21408@bricha3-MOBL3.ger.corp.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.1 (2017-09-22) Subject: Re: [dpdk-dev] What's the point of RTE_MBUF_PREFETCH_TO_FREE()? 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: Mon, 06 Nov 2017 09:25:46 -0000 On Fri, Nov 03, 2017 at 01:28:18PM -0700, Mike Stolarchuk wrote: > It seems to be used to prefetch the mbuf in preparation for a free of an > mbuf. > > But RTE_MBUF_PREFETCH_TO_FREE() currently does a prefetch for the > ffirst cache line in the mbuf, but doesn't a free do a put to the mbuf's > mempool? > > And isn't the mempool reference in the mbuf's second cache line? > Yes, that looks like a bug. Doing "git blame" shows that that macro comes from the original versions of DPDK pre-dpdk.org, and hasn't been modified since, so it was missed when the mbuf was expanded from 1 line to 2. I also note that the high-performance ixgbe/i40e vector drivers do not use this macro, only the slow paths in those drivers do, so I wonder if it can be removed. If not, it should be fixed. /Bruce