From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F423CC02182 for ; Thu, 23 Jan 2025 10:43:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 97C1C608DC; Thu, 23 Jan 2025 10:43:13 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id kU5hnlH07PAM; Thu, 23 Jan 2025 10:43:13 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E856D61017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1737628993; bh=TV+KXr7pjY3sNZBp0RlQZ82A7hdkJa6M04EkKNyz6u4=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=ujWmw0yFiG6dQPw8/2orYxcTZ9ZzIFvJLWEJ7b61kTW8onZ4q6uup1IHPILEUso2E 3x/0JRXXZIcrvrHKuLRVTTxyLDSG0ECBw4iSXQcy69M8RD0TLySWQHiDR7gIxkVkab fm8m9906RGCfrWlPGGUAvwLnCDWc9MKTyC+/2OWqQRvay6/AcZpHd7+qnEfdD+fu00 EEDCmvoaGJ+9YNgwC7dm6g18dfnw3ZhRnJR5J4GOQMwvrn/rZdydZ0xCrnesG0ZBJu lKQ46K+NC9niSQ9RK8huYCnbH4dnw9AJmIXCNqELJxjhq2EykfDBi7KBaaTU5Blt8k MoCawSbEUypkA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id E856D61017; Thu, 23 Jan 2025 10:43:12 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 8C66DB88 for ; Thu, 23 Jan 2025 10:43:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 79C5140486 for ; Thu, 23 Jan 2025 10:43:10 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Gq9rLHhtV7vK for ; Thu, 23 Jan 2025 10:43:09 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org A9559403F7 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A9559403F7 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by smtp4.osuosl.org (Postfix) with ESMTPS id A9559403F7 for ; Thu, 23 Jan 2025 10:43:09 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2C9035C56B0; Thu, 23 Jan 2025 10:42:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 200BCC4CED3; Thu, 23 Jan 2025 10:43:05 +0000 (UTC) Date: Thu, 23 Jan 2025 10:43:03 +0000 From: Simon Horman To: Maciej Fijalkowski Message-ID: <20250123104303.GJ395043@kernel.org> References: <20250122151046.574061-1-maciej.fijalkowski@intel.com> <20250122151046.574061-2-maciej.fijalkowski@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250122151046.574061-2-maciej.fijalkowski@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737628988; bh=2GQbGUS1wJQc4Ky9t4ihKM4Dc3qUZ8b7Jo6+U6rH8LA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E+R+SER/dr+BbH6v7s1u8zD9TbUMoH+k8bDIXLNX0uKzxQxUrYohb9FehVjMPIoKX 2W4OiyytV71o4s9je1JZsgQku1h7TsIt8Fhwbg+qXun6Uv5wjrk9q98RBEOQZmLNuR 3xoMpxcOzjq38ZsiElB7G+hdMwyNe5pMAhW4klwAtLv5lpYvJSJkDU3ok8sUe3uszd RjZjLPyfJ77BeM2o0MtberEZC13THr22HXB49ORHt+Jjk/2Er7TmybO6ho2AQHh7CV bgw5T2ZmoVkRMAuV5+0YxWM78BDGDZtnh9dUVRuJjqoP1Z/XdiusBwdB08+Mt5kuj/ NDOSvZ/6UFMaA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=E+R+SER/ Subject: Re: [Intel-wired-lan] [PATCH v4 iwl-net 1/3] ice: put Rx buffers after being done with current frame X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, xudu@redhat.com, anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, jacob.e.keller@intel.com, intel-wired-lan@lists.osuosl.org, jmaxwell@redhat.com, magnus.karlsson@intel.com Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, Jan 22, 2025 at 04:10:44PM +0100, Maciej Fijalkowski wrote: > Introduce a new helper ice_put_rx_mbuf() that will go through gathered > frags from current frame and will call ice_put_rx_buf() on them. Current > logic that was supposed to simplify and optimize the driver where we go > through a batch of all buffers processed in current NAPI instance turned > out to be broken for jumbo frames and very heavy load that was coming > from both multi-thread iperf and nginx/wrk pair between server and > client. The delay introduced by approach that we are dropping is simply > too big and we need to take the decision regarding page > recycling/releasing as quick as we can. > > While at it, address an error path of ice_add_xdp_frag() - we were > missing buffer putting from day 1 there. > > As a nice side effect we get rid of annoying and repetitive three-liner: > > xdp->data = NULL; > rx_ring->first_desc = ntc; > rx_ring->nr_frags = 0; > > by embedding it within introduced routine. > > Fixes: 1dc1a7e7f410 ("ice: Centrallize Rx buffer recycling") > Reported-and-tested-by: Xu Du > Reviewed-by: Przemek Kitszel > Co-developed-by: Jacob Keller > Signed-off-by: Jacob Keller > Signed-off-by: Maciej Fijalkowski Reviewed-by: Simon Horman From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6449020CCD6 for ; Thu, 23 Jan 2025 10:43:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737628988; cv=none; b=s72brT3hpyFw8fZnpecvkbwbZsaVSZWqt3E/GNPhQbI2T4W8QxMyAEELp+A4XarWcEDFulCkrBgeJZA0+ctYnTjRpMUeI0nYLFw9ia2P2xQINDu9XmFmItfNPADrvCuXNitWo5MWqtky+7w2AQwTsucvSA8ZRdLZAvalw8DmBMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737628988; c=relaxed/simple; bh=2GQbGUS1wJQc4Ky9t4ihKM4Dc3qUZ8b7Jo6+U6rH8LA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kXfr/NyNi1XqjG35Pdek0WoHnHYZES3gBhc7URa2SHfhTve4BSgRy6MPNGZ2IrJht7vDrhPsD6IcJIAgKdV1qcOC6xkAtBSMzH59rzbUkkAeoVpy80XEnCyvjzWqqCQh6nUuj7zl0umPKZoCSG3joNnzcGqZkshz0klubxuGtaM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=E+R+SER/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="E+R+SER/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 200BCC4CED3; Thu, 23 Jan 2025 10:43:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737628988; bh=2GQbGUS1wJQc4Ky9t4ihKM4Dc3qUZ8b7Jo6+U6rH8LA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E+R+SER/dr+BbH6v7s1u8zD9TbUMoH+k8bDIXLNX0uKzxQxUrYohb9FehVjMPIoKX 2W4OiyytV71o4s9je1JZsgQku1h7TsIt8Fhwbg+qXun6Uv5wjrk9q98RBEOQZmLNuR 3xoMpxcOzjq38ZsiElB7G+hdMwyNe5pMAhW4klwAtLv5lpYvJSJkDU3ok8sUe3uszd RjZjLPyfJ77BeM2o0MtberEZC13THr22HXB49ORHt+Jjk/2Er7TmybO6ho2AQHh7CV bgw5T2ZmoVkRMAuV5+0YxWM78BDGDZtnh9dUVRuJjqoP1Z/XdiusBwdB08+Mt5kuj/ NDOSvZ/6UFMaA== Date: Thu, 23 Jan 2025 10:43:03 +0000 From: Simon Horman To: Maciej Fijalkowski Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, anthony.l.nguyen@intel.com, magnus.karlsson@intel.com, jacob.e.keller@intel.com, xudu@redhat.com, mschmidt@redhat.com, jmaxwell@redhat.com, poros@redhat.com, przemyslaw.kitszel@intel.com Subject: Re: [PATCH v4 iwl-net 1/3] ice: put Rx buffers after being done with current frame Message-ID: <20250123104303.GJ395043@kernel.org> References: <20250122151046.574061-1-maciej.fijalkowski@intel.com> <20250122151046.574061-2-maciej.fijalkowski@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250122151046.574061-2-maciej.fijalkowski@intel.com> On Wed, Jan 22, 2025 at 04:10:44PM +0100, Maciej Fijalkowski wrote: > Introduce a new helper ice_put_rx_mbuf() that will go through gathered > frags from current frame and will call ice_put_rx_buf() on them. Current > logic that was supposed to simplify and optimize the driver where we go > through a batch of all buffers processed in current NAPI instance turned > out to be broken for jumbo frames and very heavy load that was coming > from both multi-thread iperf and nginx/wrk pair between server and > client. The delay introduced by approach that we are dropping is simply > too big and we need to take the decision regarding page > recycling/releasing as quick as we can. > > While at it, address an error path of ice_add_xdp_frag() - we were > missing buffer putting from day 1 there. > > As a nice side effect we get rid of annoying and repetitive three-liner: > > xdp->data = NULL; > rx_ring->first_desc = ntc; > rx_ring->nr_frags = 0; > > by embedding it within introduced routine. > > Fixes: 1dc1a7e7f410 ("ice: Centrallize Rx buffer recycling") > Reported-and-tested-by: Xu Du > Reviewed-by: Przemek Kitszel > Co-developed-by: Jacob Keller > Signed-off-by: Jacob Keller > Signed-off-by: Maciej Fijalkowski Reviewed-by: Simon Horman