Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4593187rdh; Wed, 29 Nov 2023 05:59:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGzC7u8GeGHOeRrncihSSs/JisBhXhOKKAShQG8sNMrJELBkQQZCnQyrgeP5zt/TzHfkIH X-Received: by 2002:a05:6830:4123:b0:6d8:1456:372b with SMTP id w35-20020a056830412300b006d81456372bmr15287656ott.38.1701266358246; Wed, 29 Nov 2023 05:59:18 -0800 (PST) Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id l30-20020a63ba5e000000b005b861478b70si14775274pgu.341.2023.11.29.05.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 05:59:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LCciSEJ1; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 4EEAD8040395; Wed, 29 Nov 2023 05:59:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231172AbjK2N6m (ORCPT + 99 others); Wed, 29 Nov 2023 08:58:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234768AbjK2NlO (ORCPT ); Wed, 29 Nov 2023 08:41:14 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4757ECA; Wed, 29 Nov 2023 05:41:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701265281; x=1732801281; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=O7wGOaZRZSbQQ/d5aveDQ1Pjyy/ixDtVQRLMOQuPs4o=; b=LCciSEJ1NkB1FSAQM/16rTVTMvnV5ewzwFwVeUdITmq2O1Rni3Td/eeA FJ5KmJ0+1sftd6ssvAJPrZipFJLywf4VutDVC2UOA8W+Va7dSeay2+MdQ m2hja4a8aLXoiU/Q9dWqWlqzwhLwBafr9TQCE1NUm5zFbHr2/sov3hd9Q 5304MBu4Gy8tt03rIcfjLutYTquav6jFE8LJ2DR9SgIQCbo+VXsR7Gtik yba58DMcDxitZ/Cj75ZaN4diSBh8oW5NmefxhsGcWLLpsAmoYaHf+tn/9 cnoMIIUGJdbEuGFriLZclMO31zm90pe0RJy8J5/EZB3X8lbW2CNGdvRLK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="378193692" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="378193692" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 05:41:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="768923469" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="768923469" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 29 Nov 2023 05:41:20 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 29 Nov 2023 05:41:19 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 29 Nov 2023 05:41:19 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Wed, 29 Nov 2023 05:41:19 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Wed, 29 Nov 2023 05:41:19 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kkd4BEdtAOj0CYSYMYQfQPzwSH1Q6Rhlt8dAKvSdDPMDLFD1RUVVWE/q3ADQqajmW7Lks5sBedR3eVWS0QA57sx0SOfadTYgV90pF6ZFjb2sdDq0h5pddyczOzufkxUZUtQUSU5+6Av6epMwXPmeK+yD65EpUSMhO4hQPnUNnxXLJZk0k/cvKUu9eI6OMUTUVMb6NlbqonQtuDRnEbrjkeQKXW4mJh947GYmb95c87pR2dZsC3FbTljDeZsAPs5v0A4FGPHzFRvs2ScsULFoL91zGVJ1BINxGIhiyPkqvLWYdhhd/YQCsqWLT9cQXc/MIfuHMqpQQkv/EHn/1KMnlw== 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=O7wGOaZRZSbQQ/d5aveDQ1Pjyy/ixDtVQRLMOQuPs4o=; b=IoOxlXBd9FfM+IHHb5H3+P6RHNhsiVnPeXdKfCxB0Gsill5Pogarv4dzDBNAd9GtF2PbpLd/09mxK8DdAGVy5F88Sq/z5zZz9aET04ltqr0h07URNNuGIy7GFbnrADgTCzBWOilrdWKNYt98Mjh+GQ3kw8Fw2VYMQX3iFWsOYKwNtla7TccMSdXpmizucPgG5YdX/ALUR0nDI5Gh5ItUtpgpRab9AKRc4RRI8nrSY9fOqXAjMN6D+yF9D9AOUmRsCDCypMn7PMdgli0UowhahojTf6EU1HUtrmaRAhDhMYCvCr1pV/FJED/Vk0CovzMWgmunk/sw9RXbuetkjC6ldg== 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 CH3PR11MB7676.namprd11.prod.outlook.com (2603:10b6:610:127::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.29; Wed, 29 Nov 2023 13:41:17 +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.7046.015; Wed, 29 Nov 2023 13:41:17 +0000 Message-ID: Date: Wed, 29 Nov 2023 14:40:33 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v5 13/14] libie: add per-queue Page Pool stats Content-Language: en-US To: Jakub Kicinski CC: "David S. Miller" , Eric Dumazet , Paolo Abeni , Maciej Fijalkowski , Michal Kubiak , Larysa Zaremba , Alexander Duyck , Yunsheng Lin , "David Christensen" , Jesper Dangaard Brouer , Ilias Apalodimas , "Paul Menzel" , , , References: <20231124154732.1623518-1-aleksander.lobakin@intel.com> <20231124154732.1623518-14-aleksander.lobakin@intel.com> From: Alexander Lobakin In-Reply-To: <20231124154732.1623518-14-aleksander.lobakin@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB9PR05CA0016.eurprd05.prod.outlook.com (2603:10a6:10:1da::21) To DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR11MB3625:EE_|CH3PR11MB7676:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c911fd5-d558-4b9d-7768-08dbf0e0dc92 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EsKnI1S1m2nYQQLdXS8gh7mtSn8w3jX+yvb5yCAscWeLb82MPuS/T8RCFWfn5LGDBoOk84FY2ac243fT1gec4JyzFxEbT1RkrVKDTcCn7pWePDe7F30LWOGcnAR6SUJ4SVu/5l0GHtibjKZDApHDovPHM2Vl/qgdre3DRVy0qIQHZaXc/tI/E0iOdluSyNXs6YQsFdVkX5+1Wb3RgJHfx5yCYFBlLdr9s/a/GeolGZKYjwQ3PYss0TU7RdUrrw46YWjnga6YMjjZtsrxIkGcpJNt+UxHR2FHQLOYjriinDSUzE8B42bMpEqbFbmY5c6rIytBGdLWiBxVoxQa8QRcNNou5Bw7vs5Y3++dgsL/b4KPVPK6W3INLYu2uDmgOPyIkCGTUeH/oNbTM7PvZTIQ1CGCk1OVI1cBPAGBfggpSrPNvIgL9Eo4+52MibBLKkY5+ZBw1qa0T+ymn3K3J49GgCxmglE9rO1DmQWGrFwho9vfh6qqfB8R4CThA1W5fLm6dZsRn0A7hEsOEK5ZC828lACXKFq8ErOizyxUo+V3nZZfOXOTJHAJnfz1j17DNXUOoAUYFRK0kx1c2giE/ECbPJXW7Se1zgoYkgUlJXMAEOJwj0fF8iPU3rjtE2nPHfX/B7Twi1oWq8OpJVYmftWkpg== 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)(396003)(376002)(366004)(346002)(39860400002)(136003)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(38100700002)(41300700001)(36756003)(31686004)(83380400001)(7416002)(5660300002)(82960400001)(26005)(86362001)(2616005)(2906002)(6512007)(6506007)(6666004)(8676002)(4326008)(8936002)(31696002)(478600001)(6916009)(66946007)(316002)(66476007)(66556008)(6486002)(54906003)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dENRSGJCTDJaTUxOY3daZlJjOWJlNUI3Z2V0d0dUdkpwQm5yZkxzOSs1NnNH?= =?utf-8?B?c211dVBscGVRcnVGQ0IwemtYVGpVL2FVRytodlBCRCtIL1o5TS9BK2lONHNs?= =?utf-8?B?TUdDYmhkSzcxYkdkWjcxZHNFV24xRmFFaWgzVjJxRkpham5MckFDQjd0Qkdz?= =?utf-8?B?c2hMMEE5Sjd0K3dZcUhlK3lzL0tHRUc0RVBWRDRhYlJXR216QjNoNlk2RUw2?= =?utf-8?B?WWxWTThRWGFrMUZiRnZab2gwbDdyWGNqUVI3SFRNQjI1SHprbFc3WTFGSVRR?= =?utf-8?B?Y3haZmJtK21ta081dVJEOHVrRXpTTjFwUTdDVXZMOGwreXRhU2JxQWlLNHBK?= =?utf-8?B?TWVRWjZNM2pyVGpMR21uTk84TkY1RXZuNlhuQ1RpbXVVa2oyNTV3dzdUQnJX?= =?utf-8?B?WnNs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b9d-7768-08dbf0e0dc92 X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3625.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2023 13:41:16.9221 (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: npAg3UsFp+/HO0KZDWdFRGCnLsesEcKimXsqYKjtjm0daH5yhrJz4h6U03199zZKoekJyAoRgN4hmGTezNjNmqdtPoFed3UHHvFB5MUh5ik= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7676 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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 29 Nov 2023 05:59:15 -0800 (PST) From: Alexander Lobakin Date: Fri, 24 Nov 2023 16:47:31 +0100 > Expand the libie generic per-queue stats with the generic Page Pool > stats provided by the API itself, when CONFIG_PAGE_POOL_STATS is > enabled. When it's not, there'll be no such fields in the stats > structure, so no space wasted. Jakub, Do I get it correctly that after Page Pool Netlink introspection was merged, this commit makes no sense and we shouln't add PP stats to the drivers private ones? > They are also a bit special in terms of how they are obtained. One > &page_pool accumulates statistics until it's destroyed obviously, which > happens on ifdown. So, in order to not lose any statistics, get the > stats and store them in the queue container before destroying the pool. > This container survives ifups/downs, so it basically stores the > statistics accumulated since the very first pool was allocated on this > queue. When it's needed to export the stats, first get the numbers from > this container and then add the "live" numbers -- the ones that the > current active pool returns. The result values will always represent > the actual device-lifetime stats. > There's a cast from &page_pool_stats to `u64 *` in a couple functions, > but they are guarded with stats asserts to make sure it's safe to do. > FWIW it saves a lot of object code. Thanks, Olek