Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3288569rdh; Mon, 27 Nov 2023 10:17:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPGhTpigSo2Rm2O/5xAORAeIq3qG5xBtA6WdrNP3xlpsYFDHJiky/VjcaHu5TUG91MVJNy X-Received: by 2002:a9d:77d6:0:b0:6d6:4d8f:56d6 with SMTP id w22-20020a9d77d6000000b006d64d8f56d6mr13610089otl.13.1701109054371; Mon, 27 Nov 2023 10:17:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701109054; cv=none; d=google.com; s=arc-20160816; b=oJx9SuIfiKgFbp1K7jDLm+BYlSEuyxjAQuBkUwbuRGAEUFf6ItU5nedIm61XKRoP8u St3doZOrjvUFm0rN8tXAVvKDfrYiUvne7q0jrcuO1IBJfOaxPKToLDvFWvNtjeDdN6IE Cy+n/eiQycL3NT8Zg8j5CvYlLs2+gwEXJ97BzlVW530RcgnB6hDC5nkVJaT9GwhRvkTr YLIRiEp6C+QiqVDrkngi19qJslfGlaOhNL6wv8UZDXe3YL/F/4hJPG87zwelkKKB4B4r wkTbIw+UHL2oIrxO/UnRBwul2nZf0m71nFdhAO2lN3GwGZmmiBxFEaOjpCIfuwR3rV9f u3GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=8fD3Uy4532T9IyRQlug9z+whleV/3sVfwGUEKDsAIrg=; fh=JrLJca8atC9lW+lYHsNW+bawr0tyXd29MG9Zyy3W7c4=; b=eU+wH46KYNa58lREg24WpnP8RRI8Gkj98u4z2vY72K6O4J361eSEGbZyTsw64yayTf iV6G5bezngKKP+SGJAxbsxGjtX/mv0kHG0YixAIvz3+ePWCESUqFF8Ek+bcpdc9GO+3U xKwDrEoynrOdJuC6pr6vT0gXrMDaYoIt7oDh5JpDv4gEZS8RGMmiwhdeAJowwC/GIKuI A+nqYrDnEzuAzmYly9N1HpCio3apocaB2+1JcfduoF6dwlnpiHeIux7oLBTFEK3aWzzF tMigRhq7MqpgjkPUbdt8XEI3sUjOX2Ot83cOlX6Ew5fvI6IEnijEoh/azmuPSkXhwyQm ug9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QG6ONPuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id r39-20020a05683044a700b006bd0b11b90asi4547940otv.171.2023.11.27.10.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 10:17:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QG6ONPuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D0C9F817DD09; Mon, 27 Nov 2023 10:17:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232591AbjK0SRR (ORCPT + 99 others); Mon, 27 Nov 2023 13:17:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232580AbjK0SRQ (ORCPT ); Mon, 27 Nov 2023 13:17:16 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5F1B194 for ; Mon, 27 Nov 2023 10:17:21 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6F6DC433C7; Mon, 27 Nov 2023 18:17:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701109041; bh=Kq8G4186oIvvG0OGelsVcM8Ma8D3c+DoqPy0UYxMLWY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QG6ONPukVchwWErAMLaSIt1BRLdfpyvDFYvlAneifGBLLwxrgc9YT9DQUv+jORVZl Wv2eJmxqdYpysNKvq88faMBlo509G9gLB4g5hMFATiV5ip1MamKARiU7ZI0QrcJzby iBOmDkhn7cftAcy9e+M8XNePHSRWBpEgAucP8J5IOYslJywc08DLve2OOYLOKSUH9D dXV4vYiNlS555n5f3WzGRnn8Lj7S9VnIkJT3TNd8k8d8Wd2AEfeoacY5qE0wwD7bxj 3zEqW/QBr4UsSEFa3hQSNHvf5Db9My2Ez9GHfnaqmQhtAynL/Th6EhJQ2Mwo2LLnyA KeVCUsFW2DZRA== Date: Mon, 27 Nov 2023 10:17:20 -0800 From: Jakub Kicinski To: Alexander Lobakin Cc: Yunsheng Lin , Christoph Hellwig , Maciej Fijalkowski , Michal Kubiak , Larysa Zaremba , Alexander Duyck , David Christensen , Jesper Dangaard Brouer , "Ilias Apalodimas" , Paul Menzel , , , , "David S. Miller" , Eric Dumazet , Paolo Abeni Subject: Re: [PATCH net-next v5 03/14] page_pool: avoid calling no-op externals when possible Message-ID: <20231127101720.282862f6@kernel.org> In-Reply-To: References: <20231124154732.1623518-1-aleksander.lobakin@intel.com> <20231124154732.1623518-4-aleksander.lobakin@intel.com> <6bd14aa9-fa65-e4f6-579c-3a1064b2a382@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 10:17:32 -0800 (PST) On Mon, 27 Nov 2023 15:32:19 +0100 Alexander Lobakin wrote: > > Sorry for not remembering the suggestion:( > > In the previous versions of this change I used a global flag per whole > page_pool, just like XSk does for the whole XSk buff pool, then you > proposed to use the lowest bit of ::dma_addr and store it per page, so > that it would be more granular/precise. I tested it and it doesn't > perform worse than global, but in some cases may be beneficial. FWIW I'd vote to stick to per-page pool. You seem to handle the sizeof(dma_addr_t) > sizeof(long) case correctly but the code is growing in complexity, providing no known/measurable benefit. We can always do this later but for now it seems like a premature optimization to me.