Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp408415lqc; Fri, 8 Mar 2024 00:38:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUOb5U229D6rbyIIlovLCNLL8XyGb19nIoudhI8GgSW6fDlaQsnQUdPnpif2u6ltuuLSF0QhJddtHCrzgA1jms7IhxhaZWI5giZ5RP8dQ== X-Google-Smtp-Source: AGHT+IGkOy77R8mue3XxLfR3VFyKj1uehStbRGR/tmtNwz5QNJ0TsZYrFcVbXM0cT1DfW4EkwOnh X-Received: by 2002:a05:620a:51cc:b0:788:57fc:8693 with SMTP id cx12-20020a05620a51cc00b0078857fc8693mr175440qkb.3.1709887101600; Fri, 08 Mar 2024 00:38:21 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id oq22-20020a05620a611600b007881632e22esi14142148qkn.627.2024.03.08.00.38.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 00:38:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96663-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=BMsenh1x; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-96663-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96663-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 45E861C20F83 for ; Fri, 8 Mar 2024 08:38:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D5C622F19; Fri, 8 Mar 2024 08:38:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b="BMsenh1x" Received: from HK2PR02CU002.outbound.protection.outlook.com (mail-eastasiaazon11012009.outbound.protection.outlook.com [52.101.128.9]) (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 549DC846C; Fri, 8 Mar 2024 08:38:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.128.9 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709887087; cv=fail; b=aWUVjfmEfmRKjsM/m6HBFStExzO/7PH0hpf0ESYHy0YUwiiHr4fldoljjvkyHYMWY4qvQEPExNqETb2Qb+t3N1ldaFMdGPPY9fS1i453BRwXyI07u6MQogefs+S69AMis7kOFGtUqOUJKSEg6DVA5KeQj/Od0e9p2LztqrCJRJ8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709887087; c=relaxed/simple; bh=JimobX8zmyjDLsdZziJ0Qni647ZdQe1iV1VvzoSsglI=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=YEGbwI2KGnizVXlk1e/yNT6sData1/FeMFBI84YO3UIK210I9Tq0GT/kzl4gECpUMdv61Wk3T3y/kS1PQhaVyoAwhV0wheF10i5+mNamPlXJJL9QyTaR05GMyk7HJqPk8kBRMsbihCby7Yo+JsjhbYEvJ7mNZp30P8YGWOEpxd8= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com; spf=pass smtp.mailfrom=vivo.com; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b=BMsenh1x; arc=fail smtp.client-ip=52.101.128.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vivo.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hXRQfHuw8Rl2AACBDWikKI1yCthT9aI0jxGNcp8X+cq72FDI0AhK1TIbhFVM4VzDficwQsxaEdJo5j28hQGPIKl1SX9jDpOXZthKQEStsMfJlJhnoJ7QAYfm10WHIooQUhjq2FU0L78VVtaYEe1/ixtFWM9GzQ6phlFVRl9ZfKXnLKJWO5aZrbcw4Cq8MhzhQP3GH+lkxBxlRCCu0L0XmdCyMPpKoXNkkuP/XIz/d82BvdG6uOlF7vEgMe8JSZyte5E3O1ezcvSBmvkQSXfj5/WA2YsxAUcxPhiaupUwDlgDeDM5/8acVgRBok9Ng1X4jh4ZUI7S/2tAR9rzkZi79g== 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=JimobX8zmyjDLsdZziJ0Qni647ZdQe1iV1VvzoSsglI=; b=LMhiuPMQYsg9eMUG9DV3Rt5MTdMeHda4URNVV+/N0x1SdidLk5bOErLjvL/LkVjnFVrN5+obIrUPWjIqyUJZV8yIn6CBNi2YfoT8YgWlxDhnOsBFs1uZFEIx8tcSUjXWAm8sHTMN8Mcmf1NbK4Ippp6aZ00QYb5cZnuyI3mXsF2q+sA4FSwmi0E65wfyG8AecgeFkz1FGUJyGm4WJM62UIToeqp9WxS2Lzt/yAyWknrqG6Eowsf72+ck4Rk1RFzAsraJ4s8rcITKxmWJtvkhSbrdGHSYUyUj4N3QrOYx0MFO6I+qDuRbfyUaR0gZHMmJb4mvtVmMYKeeyDe/u9Cs1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JimobX8zmyjDLsdZziJ0Qni647ZdQe1iV1VvzoSsglI=; b=BMsenh1x3BxDu1LpiL1V6DjVBxdDvZ86hLLQzXZphd82XYzHuXYrzl42O+5f0H8O5Onu/iQQJKbqm/8f4ni3P1lcbNHEe7niJnlwkwLlmCIFveBJbu9/ytokAf0t5GGFkugD0Bx+m8bc7Z6XxafQYgefRCfepVcj1reda0f36goxfpVCTanKZDNzG8y4jBJOJbOC/2mMsyk6duTdTMFOhPGqy8PxSoMRBjTckKPue60vlM/ug7BN0QdghPVscYhzfiTZWk47RX4njcTUDcGnE3jrgfNifCOVMVu+CcxfuAapzSAzdJt1aZSJjyn1zffv4onCxDY30Kw+zI/f4pqNhg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from PSAPR06MB4037.apcprd06.prod.outlook.com (2603:1096:301:33::10) by TYUPR06MB6098.apcprd06.prod.outlook.com (2603:1096:400:358::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Fri, 8 Mar 2024 08:37:59 +0000 Received: from PSAPR06MB4037.apcprd06.prod.outlook.com ([fe80::d9b9:81b5:e5a8:d05a]) by PSAPR06MB4037.apcprd06.prod.outlook.com ([fe80::d9b9:81b5:e5a8:d05a%4]) with mapi id 15.20.7362.024; Fri, 8 Mar 2024 08:37:57 +0000 Message-ID: Date: Fri, 8 Mar 2024 16:37:52 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH -next v6 0/2] Make memory reclamation measurable To: Michal Hocko Cc: Steven Rostedt , akpm@linux-foundation.org, mhiramat@kernel.org, mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org, opensource.kernel@vivo.com References: <20240105013607.2868-1-cuibixuan@vivo.com> <20240220212202.59ddc123@gandalf.local.home> <3d4f44ee-f533-446f-a9e6-7f58afc78d65@vivo.com> From: Bixuan Cui In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR01CA0183.apcprd01.prod.exchangelabs.com (2603:1096:4:189::16) To PSAPR06MB4037.apcprd06.prod.outlook.com (2603:1096:301:33::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PSAPR06MB4037:EE_|TYUPR06MB6098:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b0147fd-1e58-4c0e-102d-08dc3f4b0e47 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4TPZHBFczDafrdLEmvyKI77hqCTZ54dPKVkRkuvLZUrXR75w/blSt+4NK6/2LbL2+/VE0OyferPtHtj0uMsIdu0QLEZSDiC4fW3F209cHzpUMGdqPtAwav+hsrTbRtiIwi32dsywFkU3UoBkVC1HT9XkHRBkSDvVSOQ1xjS1kuFPzd21+H2n3+ypVUwKaClTBcEYm2KeaYqjCD6ABbuVL/Row13GfmSRlgfFvs1oC6aVtVs1qFaqnENRj4c/LclNScyWAdOYj0Zr1BOqR6VUuLiN7diRtyPEquJ/PfE7CRCtYMXZvVHP+MyfP0B/EGt/QlqMWpSR/hDVylPwVcSmClYFyUE69MxBBh4Aw35f6cFFiRteHuz9vn0QOEdq5i/GqPZ896FmRcnymZrAy1UYjgVyol2amwYR0SCegFgiMecTOaIzJ+Qsc1FDmHsvo//81KDjK82CQa2J1hC8Ur9n62blHWtHovVU8OyygE1HTzBxZOZ/DukiPmDcc7S/9wUSWvTtDvovN4SL0FFiW6oKrlU+pqkHZSaFCaq0DdMM/JEAt/ZlYT32pOwICPAsJOMPCNFv0fBSxslQusjmRuBbLRoo5GxIT5NvnfB9qvOQkrMrCljIqTDfwlcalJSUKrhN6nj3AiGQx9S/ra0O3/W/kJANm6af81MmQSeto+6SAHtM9BDSamiHe7NnIvDsSphPV4WhLWzbumqX70l6vBHefWpJD2rCVsXNSP0EOyhrWLQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PSAPR06MB4037.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(52116005)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UlRldWpZdCtLTWFRRDNOMUducXcybVJXOHhrNk03ZnhseEZmb29VQ3h0YXRk?= =?utf-8?B?eTQybDYzQXA1TTl5QXJrMmdVU0labHp4R0FRaDhndXo1UCtYc2FKejJZMHAv?= =?utf-8?B?Nm5sYUM0bTB2TG9saXRSZyt2OFVjek4zOTNKUkNMd2Z2ZXJQV0dnUG0vbjJh?= =?utf-8?B?L1lQU25Mcnk1R1c0czQvdHY0a01TcFdBUkRlZDZaTEM4NzA2TUEvSkxkTG1R?= =?utf-8?B?ZHNBMHpUVzlxZW5DV2p1dHM0NGdvSmxsYTU0MTY0SlgxUEtOTzNGeTlqL2lT?= =?utf-8?B?WTVpZTd0cTlLd3NjWnVMRXhDdzFUaU1wdWFjcExpa1ZFS25DVC9pTjY4d29z?= =?utf-8?B?SVY1V1l5OGNidFNmOThBaDZ2WFJFemlIa2pQMjF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Id: 6b0147fd-1e58-4c0e-102d-08dc3f4b0e47 X-MS-Exchange-CrossTenant-AuthSource: PSAPR06MB4037.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2024 08:37:57.6264 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QOQAoKGy+Jw2L8kmiTctRebruhDDDr6f63JCRkhJKlTj0g5bjIW+nNv4bwoV1C4Gbhe9sdD8GuC+2V3opPNaJQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6098 在 2024/3/7 17:26, Michal Hocko 写道: >> The main reasons for adding static tracepoints are: >> 1. To subdivide the time spent in the shrinker->count_objects() and >> shrinker->scan_objects() functions within the do_shrink_slab function. Using >> BPF kprobe, we can only track the time spent in the do_shrink_slab function. >> 2. When tracing frequently called functions, static tracepoints (BPF >> tp/tracepoint) have lower performance impact compared to dynamic tracepoints >> (BPF kprobe). > You can track the time process has been preempted by other means, no? We > have context switching tracepoints in place. Have you considered that > option? Let me think about it... Thanks Bixuan Cui