Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3987837rdh; Tue, 28 Nov 2023 08:51:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAyfPzns0D0U75re30qX7cysUve6iWk7z0GInFiREqETBAKPlCiRRwpbdWzMQE9bGlVL3I X-Received: by 2002:a05:6820:16aa:b0:58d:981e:bc5c with SMTP id bc42-20020a05682016aa00b0058d981ebc5cmr6597818oob.7.1701190317732; Tue, 28 Nov 2023 08:51:57 -0800 (PST) Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id z14-20020a630a4e000000b005c1b5a2be77si12129253pgk.702.2023.11.28.08.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 08:51:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PWH8WZVQ; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6766080576FC; Tue, 28 Nov 2023 08:51:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234885AbjK1Qvd (ORCPT + 99 others); Tue, 28 Nov 2023 11:51:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234702AbjK1Qvb (ORCPT ); Tue, 28 Nov 2023 11:51:31 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BECFD4B; Tue, 28 Nov 2023 08:51:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701190297; x=1732726297; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=8AcFphvl2r/ylBqtrwuLKB5ZrrRetYuVVCN3CKStIUs=; b=PWH8WZVQ7BuEbXrR2QqjyAydWXadF6ZKJluaPN3BXLLtEsoDgZG0z+Bf JLSU/JJDl5IU+a6kxuGWUl+pHWs4i/hecxS+kplxsr6yCvsysp3XUaTrG UUP5oL3VL8KvUNUdwGEyyI0/T35hv/pcHwJKU0i7V+6U2ldDAisdAcLLt NLtEB9ZzZXudv0q1Mm3ZMJpAzWWDqJu/UoSqgqFsoepQv9vhZa1ezvK+B +NszGLHIAQCp2UtUxtA7D4gjN38L36yEiPJwy8UiQ+9aQbUfPYupHNucu q9cc95URqE8av5E8jF5G8mLtqDrYket7zHE5ZXp18Rygfd1jxNhcjlFTL g==; X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="457294125" X-IronPort-AV: E=Sophos;i="6.04,234,1695711600"; d="scan'208";a="457294125" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2023 08:51:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="859479761" X-IronPort-AV: E=Sophos;i="6.04,234,1695711600"; d="scan'208";a="859479761" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 28 Nov 2023 08:51:36 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 28 Nov 2023 08:51:35 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Tue, 28 Nov 2023 08:51:35 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Tue, 28 Nov 2023 08:51:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ylg+57am85xTYG4JqPdoFLrOwn7wrNtGeKU/nASFeyT+HOpWNMxbjEla+WV1L0Gfz7XAwgm/XxzskWfJz6TZp3fDXxYnrNvFLDGzCZXlpTxNjlsQwpJ55nODjT6mgXCFTINCXhqB5zK6lIMMGAeGmUGFwjlfhPiZmiafP1qjiLXu9iaNLjOYEnEZUwaWtZ4V5TvGEwKb0kw22CByep0DyyK6e2wfqc6Sa90cy7a+v3TdzMA9PtCIc87D2h3kaMa6bK11+xg43VaF0buO66ug7UErATR4T25mcXk1bgj8trh57b2OTyrmJDKBNnnQKkxjMEIbPLgIH/g7DhGfsYONzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mY5ukfyoKrrNpK3YRsrjbKa4tcBSX7C/03E8YOMUEHg=; b=ZCrVvKS58WZ1SosaM0sgM45xMkHw05Otjaqj9Nx4DgI0XXeQZILwQW1tQJL2RWjE8SXQdDZkvX9W4XSnf4Yrv+VyZK1L5fGlI/5+RGg+TKL4kJ84GSuFaHXqRdI28IJQ7KHI/G28wUGGECO4WTKnrt7LqILu6YDUH1NvGUVYrEk5VrPnxNu/af7EK8qyIqSoU/L70mcIWR30ahQlrBknx0jzViN+LBl6Y9kjrGEvrepapQO5xUOIEUeGB5Se6/oYYnhC0MZFEAjbUCby5sU72G0YKDB/ZfjSC8Q70tE+RqMbk6tgfAxKvKuQn2/OflXgI0G6pfhzEtSmmoR2iC0UVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) by SA2PR11MB5019.namprd11.prod.outlook.com (2603:10b6:806:f8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.29; Tue, 28 Nov 2023 16:51:33 +0000 Received: from DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::36be:aaee:c5fe:2b80]) by DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::36be:aaee:c5fe:2b80%7]) with mapi id 15.20.7025.022; Tue, 28 Nov 2023 16:51:33 +0000 Message-ID: <9a65e703-3476-4584-bec0-8f41198d840f@intel.com> Date: Tue, 28 Nov 2023 17:50:57 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v5 03/14] page_pool: avoid calling no-op externals when possible Content-Language: en-US To: Jakub Kicinski 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" References: <20231124154732.1623518-1-aleksander.lobakin@intel.com> <20231124154732.1623518-4-aleksander.lobakin@intel.com> <6bd14aa9-fa65-e4f6-579c-3a1064b2a382@huawei.com> <20231127101720.282862f6@kernel.org> From: Alexander Lobakin In-Reply-To: <20231127101720.282862f6@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0195.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a4::7) To DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR11MB3625:EE_|SA2PR11MB5019:EE_ X-MS-Office365-Filtering-Correlation-Id: b7c4cecd-b54d-4c93-932e-08dbf032471f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YuMBBaXAm6Yxkn7F2GXLQ5DaqQdAX9/Lke2YJfbw/uwL8llZ0xZyOWZAJsGTyr7ER/ypkUgi5sacKWc4Wgf+/FLJ1V0Sbkpq58+ojn+Y1f27b6lObTYEZ+uxNGPFJSv/lZ3zQdaupuYaMNj95Ayzc2PHsqK0psCycdl+9oibq5JrFA1dUlGvmbRz0Gfvl4EjGcH0HoghV5VRK2XMgYrePSZxBOQspRZMQIWhFYG+dQoCCq7p9bTjOj3nAnGKbNlNKtCqnvtPdS7KK5mvqTnsaWcb12bIy/+1lwmwlIjDFCuE3upfLM7BdpoRpptHgeEKUyMNR2E9i1Nv7aP/yOy4shA6CP+ez5EyhNvIaiZguxd3l7Yi96UKZqV/ZGezc2V/QBcreoRWPQfhNjRTGV50KcFXmo5svkDMc+Y/jMmQq34m/n/XenHmKkGFqeUAnXO47oeGHLbVFtL+LDIZ0opYyMGSnKTIn7AxG2ajA0tKiCCxzKuUk1nwW1tg+qyGNxbwJYYKQHXZ7HTmDUHkT9AtZejyucpBIXVbPjUv2xgfMhgEiBFIf0tjS0OttvfnNZHBFuu3Gg3YSoxgnXI8JD0U8yUaYIPzhsdWtJGmiKpyAIAGTde+c8l+4/4uLmwKX4j/BK2/Y0wV212gcR0dwzs03Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3625.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(396003)(366004)(346002)(39860400002)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(316002)(2616005)(6512007)(6666004)(31696002)(86362001)(6506007)(36756003)(26005)(6486002)(478600001)(38100700002)(82960400001)(6916009)(66476007)(66946007)(66556008)(54906003)(5660300002)(7416002)(2906002)(4744005)(41300700001)(4326008)(31686004)(8676002)(8936002)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MUxDWFJkYlBaUEdNZThyT1FGYzNUNXZTbWhYMm9EUVVjYTRTVzYyelhaUkg4?= =?utf-8?B?K1o1ZEdnNFhCVTY4MmJOR3pKNURONnlNbFJCWmd4QlVLOHF5azRJazl2RnY1?= =?utf-8?B?OElsbW44Y1JVSnhCQzArZEcxT0toSDhQMjl5VUUreVVMcHZaZ2U1VnhYcUxj?= =?utf-8?B?dlJkYkx0SUpDc1gyVUc1MnFON1JDVkMrMUFYbEZ6VENEM01uTitITWRyNGJh?= =?utf-8?B?Njl6YzhQMENlMVZmRGVYckJKRjdSUXFJVG1Cd2RSaXF1bld6MFFOOHNNYkla?= =?utf-8?B?UVpYMFNhaVgramhseStIZzNOVmc1RUwwai9VL1U2UWlUc0VpOGhqRkRDUEda?= =?utf-8?B?bXVuSDZuTDBYRS9LRHowLzg2d01qNFFxVGJ4OVQxWnErWnZlMnMzYm5USUp3?= =?utf-8?B?YnczblBoYlhNSE1rKzlodXUvQWtmbk4rZmx6NkhLZHpZV1BYeE1W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MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3625.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2023 16:51:33.7749 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XnpQJZ0eyorwBPfo1ll6kMGT/nGzTA99sNY0zFxKyN8Se0zMjY/Et96Y2zULT3+ThLubZARWUp9gBYxkAnUhYL+96O0M5edbTi5eqLTKd/k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5019 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 28 Nov 2023 08:51:54 -0800 (PST) From: Jakub Kicinski Date: Mon, 27 Nov 2023 10:17:20 -0800 > 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. Yeah, this also seems more logical and optimal to me. Will wait a bit for a possible reply from Chris and then send the next rev. Thanks, Olek