Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1657900rdb; Sun, 8 Oct 2023 19:58:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEr2NW5HJdqQJrH+nKR6qSa5F8N5m5hJajHM4gPkMo1wk2b8DznND9e+ApGfIdRNi0k0l9g X-Received: by 2002:a05:6a20:9687:b0:161:ffbf:d949 with SMTP id hp7-20020a056a20968700b00161ffbfd949mr10576483pzc.3.1696820284597; Sun, 08 Oct 2023 19:58:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696820284; cv=pass; d=google.com; s=arc-20160816; b=IGQJh67rSnOhgabgRvmnc3Iy9qSNBTRIzHuvAjqWir9DAZCQrzENTvzWDtxMN13MZn ppVIwvLM/JZqn9pYVt02ia0WGx47KlWgibwhdwvd/8l6d4X/zpPFWD9mn4ajLVyOolKp yXItBJuCarGZ2CfD3c0eKoePXMKJ89mzsTcUY/M2LwGXikDv9ttpZDPBp/lPbQJNmfdF ZGVYSPGtZJisfErhDFKa/mtgKm/ebSaaBxlDNAFFRrvwU7hZONw3RQfPywV/sWhpa+F+ U6pr5HVSlrN8jRGaTXX9q27BBUIyLlc5JjGOP3B4TvCH5Mm3vEkpL1sGCDov2T/D3E8F ZkUw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=3qQSxYVcIRdZYlpy4CK2cf8P/SAzI3dXY8TsE1Jz0rs=; fh=rye/gs8YomfPRfeNPS+eL/Y+BvTKxQaTxalY7PeO5A0=; b=XT7n3Nxd+cltiQGXNc/qMb3SKuCG169rpRjpy6vZytS/gVNLC0ZRYJ5xUqpYmi+C8h s5NxX+w4UikCJa6R0OdFn2YFK6D79yB+c/stIzag+F8GoNFH68vqJgNYbDRTjo5ZFzlW ozjLYBIsnZg4SDv9v1pMi3IIra2DwXax7svr5EBx4z0Zp1dKN4eoBfOjC3MzBZKGESo3 fjigUw2MSXWIl70vsPeyPeqU7l4IblujcDTbBEtiM/ufNNvSk5TYVd6o+DwsN5g/HBij 3e9j+P8ztq0/z4NhV03ETE6x5EonsYQ7e2HEWsQQKnq0JDGAL3KYY6KWD2mmoJiZzrrr YkRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=X1YKheHK; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id jx11-20020a170903138b00b001b973681493si8031616plb.16.2023.10.08.19.58.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 19:58:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=X1YKheHK; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AF8B8807C857; Sun, 8 Oct 2023 19:58:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344981AbjJIC56 (ORCPT + 99 others); Sun, 8 Oct 2023 22:57:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232350AbjJIC55 (ORCPT ); Sun, 8 Oct 2023 22:57:57 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2120.outbound.protection.outlook.com [40.107.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC5839E; Sun, 8 Oct 2023 19:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SS/4wQE6VdEkAZyF5Hw4VWp8KRSVFGIlqBiMd04YWDyGWTyl9+gUJJbE7QA6gROzWiNZgTYoYznofsHhJXEvucw8OylLJcGUs6uz6NjXaJr6d9OUxLKL2Cg9ANCRe/82jTCzCepYFXV7jby3pTXhUgaLzhvmOaULWtbvWm029K4zNcgo7RVtq2+fqgDOP9WsmEUwWxCwSetbWN8bhbp170pAJibtXuBcTXRPn6dLOPFCXfbsCvybuGGIFMjYBME8X27ZAc+aC8TWVEKboJ3z2cftpsSjulEb2z4Tbm2oALAAnxiRdW+Y+Kfq9lu4z0bKJiMD/HyzAxwj//Zy+mP7Ow== 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=3qQSxYVcIRdZYlpy4CK2cf8P/SAzI3dXY8TsE1Jz0rs=; b=e8Y7JAFkLoYIKp72yyWvyH3S777OW4o/jf8IHYljR4euDsMETmmIxXET9w1u/oePDp8Wu29drKxWdGvQK794qiW3JgUBJkOH4v52+tqMIQo2PwZrT2u35es29gU4Gsa1FOCNvWHQjdsDBe6BNkqB3oMawUXTp7OVWiquH6Hjgzs1zAtNS3L7sQrYoCTgqVsNBfc1jXBkPqVc/3oHCmm45Ayux63iqucYVjGeuEMUuebRAqOuEUrJu/P8Jjy1SaoeJINswvvDQ/EhSZ6GIzM0T3JMZ5oeQZ5394l55JyCNF25lQN1IZKTeRP0YCPVdJ+Yjc6IONpjalCEqcRtyfMsIQ== 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=3qQSxYVcIRdZYlpy4CK2cf8P/SAzI3dXY8TsE1Jz0rs=; b=X1YKheHKevB3tvzlxdvdSkTSFP09hpl2Ta9Y3rID6npcPPsO+NRHnuKQ3bWmiokZfO0DzY7r9i+vong7GGDdL5cwzkbltUVGM5mVkpqYc2HFjljQI/+9b8Xzeek8ot0+0s69ArYnyaMGl04/tP1j7tGVHX6wsVm+qOdvUgCmJPWFKAjNWnUuW7B3EfgiOYD8CzxmDyPWwcB5uhJfvBxgXfZwobTFyQZPdUmLQF+7cuDoTbjxZLHBzhOl0oC3Bo+ulRMJIXwWlWTR8MVtPvU9oCoz0dqWhSk3lnNYK+vPwYmqHOiJ1QoNjQQZ9YPrq5hxb43X87s96341vRcXH31Gkg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from PUZPR06MB5676.apcprd06.prod.outlook.com (2603:1096:301:f8::10) by TYZPR06MB5396.apcprd06.prod.outlook.com (2603:1096:400:200::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.33; Mon, 9 Oct 2023 02:57:52 +0000 Received: from PUZPR06MB5676.apcprd06.prod.outlook.com ([fe80::40ac:5701:4617:f503]) by PUZPR06MB5676.apcprd06.prod.outlook.com ([fe80::40ac:5701:4617:f503%4]) with mapi id 15.20.6838.033; Mon, 9 Oct 2023 02:57:51 +0000 From: Huan Yang To: Jonathan Corbet , Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Yu Zhao , Peter Xu , David Hildenbrand , "T.J. Alumbaugh" , Axel Rasmussen , Ryan Roberts , Kefeng Wang , Suren Baghdasaryan , linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-kernel@vger.kernel.org (open list), linux-mm@kvack.org (open list:MEMORY MANAGEMENT), cgroups@vger.kernel.org (open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)) Cc: opensource.kernel@vivo.com, Huan Yang Subject: [PATCH 0/3 RESEND] Per memcg lru_gen node stat Date: Mon, 9 Oct 2023 10:57:19 +0800 Message-Id: <20231009025726.5982-1-link@vivo.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI1PR02CA0011.apcprd02.prod.outlook.com (2603:1096:4:1f7::19) To PUZPR06MB5676.apcprd06.prod.outlook.com (2603:1096:301:f8::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PUZPR06MB5676:EE_|TYZPR06MB5396:EE_ X-MS-Office365-Filtering-Correlation-Id: 18cddc44-10cf-44f5-5a02-08dbc87386fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ff6B0cugS8N9cWX1L32R+mFTs201eyZL4jzvNDwKZO1cx8VRJ5pDFI4xHHkHD54O/cbPrjRew3FPRoPhAbwWeKzdxP42Berg4iDmEGLojzSgU5fQGlKckVitSwouR2Y5JOLY2tP75va1A9IVf3JDThbkn6cRex260biHB+R9XhnHOV1D3hKnumGKAFQcVPqJakcriTxsqqAP02oqIdpVMkTk8aU0AcwWfVQuHwC/BAHEZ2rS1u1zi+6vywsMd+Sker3VgNwSz34LdXzxTDZN6gl+bBiOJVyNpY80EvHutzOTKb5+06Huns08n580PN4xC5GHyCmAK6RcnHXDev3XmE8UTzDGUwLQkCn1P3l+gsxtU48qd/XmpCtsie2+p19pdkAceMNkq6DswibXB/RsUXXBprqS1ysicVT5Vcs8Q4j9D7Pqyt/Wl0UJuuN/A505a30t13XB28ikte9qtOK92EBDJM2WOglX+q0DqP6Q3EsCiYgjmFa4dqidtkpvC7QPVMGEC/GnqwV4y02EV3jpo+fgjYmkedNEt8zy1rHTMRNmlYsAxskBnvSPqrDsCYkr3DR5hmaxjnzWRqVCcWUKKg69zpyFBoyX1jyxzI28PHyUreCRQZyCskAn6snbkAPjCkQoPRYdrNGZtCluMZ3GFw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PUZPR06MB5676.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(136003)(366004)(346002)(396003)(39850400004)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(83380400001)(1076003)(107886003)(2616005)(66946007)(26005)(316002)(66476007)(66556008)(110136005)(7416002)(8936002)(8676002)(4326008)(5660300002)(41300700001)(6506007)(6666004)(2906002)(6512007)(4744005)(6486002)(478600001)(52116002)(36756003)(38100700002)(38350700002)(921005)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?r/eiNj8sbQ2pv2XmDG+AQIQlTkoT7q9m9656HL+3rrqz7LHZOcAt4cyXp4GA?= =?us-ascii?Q?4BAgvWkmEg6ZKork3CrTjYnhREvc9n+YrtREPu3bYaNyVDNUYDnIiqSl8g2k?= =?us-ascii?Q?mUY6O0t/ntRZtrhFcTgnQVP2Yo6En5xhw3spIc6ZK3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MnkpORkFksbsehcBVlnMKNK14171ldnN5uXHfEA/xBy3SDZmUTu?= =?us-ascii?Q?lkU1Lyo4lrmUmIeN1Lae6KHw7k/aKHRrm8TxJcE+y/C1Iy4ETh48hjFTW2oH?= =?us-ascii?Q?Vty40Zx2FB59gdMSb0k8PA5f5XyvOuknCtJTAQVNjqwsQpoyXMjAtzFWkcYU?= =?us-ascii?Q?nYo28mLbEQ0Y7uQsTjHCbKw3hMrmpZN0jhW//1+c7m21cNh6MDefjNmBTLiE?= =?us-ascii?Q?P89bP8DA2V6Z7030xZ25Mo76c3xorgp/ZJTOw6o9KmCLxmGNUhOgOTzY6X36?= =?us-ascii?Q?YzBFnS4o3bBsIJ/1ZNk+aPeldIXTbwWiYn6jGpyNYVlPENp+pb9CEfzhhzdh?= =?us-ascii?Q?9xPJ5eGUaPuOZa30MuSRhkaF1L/kdQpRyp3nF3Qhchp+JeTR+NZsJurBXbg7?= =?us-ascii?Q?EhZvRdjRg4p075CwtE9r+a/5XRqHnQIqh75N9Tgu1XyWzC+EHv7jRFOHCSLF?= =?us-ascii?Q?KavfIQilSqHmD/V9eDq0j1DvABiZ00zpVXmgdczF0OLIwrbKUlwpEZI/TtqY?= =?us-ascii?Q?eZamD9jW5bdnakZanvfYIktDZTUT2Qe8OBGEXUzG?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18cddc44-10cf-44f5-5a02-08dbc87386fc X-MS-Exchange-CrossTenant-AuthSource: PUZPR06MB5676.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2023 02:57:51.8723 (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: WSuR39iWb4dXKXrG/RXo8quRGjVAsXQenS7jqKWbMOjuPrZi2pwH55QgGg+uAzMkxAXE08IBX7rD/LQ1ad2Jrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5396 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Sun, 08 Oct 2023 19:58:03 -0700 (PDT) On original global lru_gen node in debugfs, it can all show each memcg's lru gen info in "lru_gen" or "lru_gen_full", and can type cmd into lru_gen. But which show info contains all memcg's info, and cmd need to know memcg's id. This patchset add lru_gen node in per memcg, with this node, we can get lru_gen info in each memcg. Also, we can type cmd to control each memcg's lru_gen seq, but, this node don't support multi cmd, single memcg just process one cmd once time. HuanYang (3): mm: multi-gen LRU: fold lru_gen run cmd mm: memcg: add per memcg "lru_gen" node mm: multi-gen LRU: add per memcg "lru_gen" document Documentation/admin-guide/mm/multigen_lru.rst | 10 ++ include/linux/mm_inline.h | 9 + include/linux/mmzone.h | 4 +- mm/memcontrol.c | 163 ++++++++++++++++++ mm/vmscan.c | 82 ++++++--- 5 files changed, 246 insertions(+), 22 deletions(-) -- 2.34.1