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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6E0AC05027 for ; Thu, 2 Feb 2023 06:03:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229991AbjBBGBK (ORCPT ); Thu, 2 Feb 2023 01:01:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjBBGBI (ORCPT ); Thu, 2 Feb 2023 01:01:08 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2FF75CD2F; Wed, 1 Feb 2023 22:01:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8CF476154E; Thu, 2 Feb 2023 06:01:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6835FC433EF; Thu, 2 Feb 2023 06:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675317666; bh=W4PCtIoPHqMjZz87oYbuJcDIyOhDoAR6qCTIFYNoCP8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ujaa4ZyEv+z27/qk/4xB2YOOGBHiI10vZVEy7EzL/lWS4ArFvq+mNFcQOhYL+RKbv 1IaHCiU2Kb7MQHWBsZ0AF06BXZ+bsvxDhihMesKtOwfal2SZMYlkMMGJLLUZ9MZv04 1S/Cocy5n1a2JNceS2gBbCjZTxh37ico9qy2AKlMixZdnC8Zx2HU3YVFvWik7sg1XG bL2wOhKGK/WeIXqHjO5/Q/i7ROuDKMZx9JtqNwv3TOUPW0QsXMba1lTfFHxSVaLDEU qXJQq/0xgMyWGbtR9WEvGtULZxLvPehnKKY22z6OcBxBsQTMe6J5GKdyOvoIn5ltRL L7vKMRw46dS0g== Date: Wed, 1 Feb 2023 22:01:05 -0800 From: Jakub Kicinski To: Qingfang DENG Cc: Jesper Dangaard Brouer , Ilias Apalodimas , "David S. Miller" , Eric Dumazet , Paolo Abeni , Lorenzo Bianconi , Daniel Borkmann , John Fastabend , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: page_pool: use in_softirq() instead Message-ID: <20230201220105.410fee4c@kernel.org> In-Reply-To: <20230202024417.4477-1-dqfext@gmail.com> References: <20230202024417.4477-1-dqfext@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Feb 2023 10:44:17 +0800 Qingfang DENG wrote: > From: Qingfang DENG > > We use BH context only for synchronization, so we don't care if it's > actually serving softirq or not. > > As a side node, in case of threaded NAPI, in_serving_softirq() will > return false because it's in process context with BH off, making > page_pool_recycle_in_cache() unreachable. LGTM, but I don't think this qualifies as a fix. It's just a missed optimization, right?