Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp81404rdb; Wed, 18 Oct 2023 19:33:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFrRWfIN7Vt3NPw0QgrG0bILPxJ1TArIPOcMli5uBLDwONSPN8fZHQWWp0QOR/tyyuhZgi3 X-Received: by 2002:a05:6a21:47c6:b0:174:f06:34dc with SMTP id as6-20020a056a2147c600b001740f0634dcmr826725pzc.28.1697682838979; Wed, 18 Oct 2023 19:33:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697682838; cv=pass; d=google.com; s=arc-20160816; b=urAPFeUShYUe5f0GrgEQy0Yzblqf4/MSWXv1P2IaT+aEc+o3EDedQI1EknCdDansfm NBz7edespJw4+yn8waqcE2pw2rgeZzzHKDbMgn15k7Le8fe4GcKArXazEx/fTlvii5My 54rBWf4J8i4loNYnFqeeHPYJsJiE3iUSEwAkUlic6DZTXzTnwlcbWcKm3OYAQ7MCvShc zwlD3y8cLqZ82u/blDKkKijAOSCI1THDF0kkZIU7+f8XkPXzWHfspQxkSSXn3Q9YuHEl 74PktR/ps2bHKYdaE8XOUll1XrXq16WljZEFWxOBqdaM9yezJs+5kjirUJFaRjCD6m2h J7FQ== 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 :in-reply-to:from:references:cc:to:subject:user-agent:date :message-id:dkim-signature; bh=AvMaeYR4txS+Qyh65EZnNk4KCVOxaq8GMP9qckkYsOE=; fh=qTpFK1huEpUvJQ9zOvQvZHXEC5OvaQQq7I14OZHhJHI=; b=Ss00aTOte1g4PAej2vg7SJ+yoHjfXj0PYfUqY/HFCX1qxDY8k+p/QF0wFcugf6FMCJ iVdgK3u8F691i2ViUMI2I2Bu4wsuCJHX0PQ7GilfAolDQmES2YjF8I0kpjbllmFxXM9x NukZZq//248u4881IRNCtXyRL036fpIz7Sr79phmoRt5zcqztx7dWQnHh18PeMlzZseY yaAlA1VrKP5wzgpGEDta3rkP3lKop7TNxOHS+FI+IPMpR7Ft11GmguwRpbF3gTXwHmG1 5QiJw+adBpb5DWINgfwt/1PueYw2r2aCRzG/aw/a85WGEb33p+KOPGNvfI3WN76T+oxh 8Adw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NfDw7bLJ; 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:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id u8-20020a170902b28800b001c60d1de681si1117840plr.108.2023.10.18.19.33.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 19:33:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=NfDw7bLJ; 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:5 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 groat.vger.email (Postfix) with ESMTP id 943AD80EE7CE; Wed, 18 Oct 2023 19:33:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232589AbjJSCdH (ORCPT + 99 others); Wed, 18 Oct 2023 22:33:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232691AbjJSCcz (ORCPT ); Wed, 18 Oct 2023 22:32:55 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61CA5D71; Wed, 18 Oct 2023 19:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BMcrAb19ho4o84FfMuIIErQfnWu3u+H9RY/IXULCNOz0kZV/0fuGvFrxNWjS3vEDbfqTPx5VtCm9H6UGZGfBmYcX4fVDKEh9PCpFR9dLQsRWLuZsKYkHvLkOvdAgfV5FvctRepHeYyQ4Dt8MaNjvqQGOxLG30aY7Ild0MI0hJqP8kdeGlQaCXra+hmivxiKwnO855M5/KcUhx9hfqNPBNBAGbpTOompPl+YzBadibqTttx6GZStul3dBKo+L+3wkDqSXeO3zqVXWJi8+QHuiBntZW1aBL9ye8DLU3vA/rou/pC4SeRQ2pT+JqHNvbHos+2FZhvoq7DhyoJ9inYIxuw== 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=AvMaeYR4txS+Qyh65EZnNk4KCVOxaq8GMP9qckkYsOE=; b=hevXL5f9tsThqCb59qlIB+ZfkF9v0vkDk1e+RqEvvkGoMq/FNJKyAbVAA+JVptml35aYRpPleP1jukBiQWHOKsNkiCbEO68KrDh2EhaaQmeio6E1Db1O+h8W+01ElxnIa+26qmc6uYaphS82uouA8L7QtPoXK/M4sBJmILwyxK7+elaKtZWChmC9LQBsdLSk8lrZz3BIuz9s/VVFbgZV7EZs43687jcJg2tiH/KVStw77U8HvU2SuvxvdgYYb81ra4VhogGhgINcea0qO7W8XnSelF+0TvQzTseMeTNbJZdWlfcS0ClJKlAAYr+4hwI366AJ4nV6nG4T2mGlUFcD5w== 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=AvMaeYR4txS+Qyh65EZnNk4KCVOxaq8GMP9qckkYsOE=; b=NfDw7bLJrznNZ223gquXsGfP9Jl32uUse1cYzbmr5ZtTTzBBTWn1k8kdHLSE2uwpTqGse+Lwmag91z497EJSkP823/RAV6QLa4zGhDndc31+BxpH4nnPaG4yEt0FiNxiLVaLx+wMc/9SKMYLtwTur7hxVkQrMm3YPXvUVLQThbJBaW1tcrnMOAZ23DZPs/UF/3U4oPO45YkTQ6GrYIH4e821cs3MfsgnPf9/WNwx7riOYuW1Af3P1U6EeN4898ddXMvIERDuTnIb3+4+5J8d0BzkoqzE5O4+lpcex1MqmQ21rw3Zp2deByZxUTNtdnFDbVaO5JrRRNNw/KJ14e0PBg== 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 TY0PR06MB5756.apcprd06.prod.outlook.com (2603:1096:400:27e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.25; Thu, 19 Oct 2023 02:32:22 +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.6907.021; Thu, 19 Oct 2023 02:32:22 +0000 Message-ID: Date: Thu, 19 Oct 2023 10:32:15 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/3 RESEND] Per memcg lru_gen node stat To: "T.J. Mercier" , Yu Zhao Cc: Jonathan Corbet , Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Peter Xu , David Hildenbrand , "T.J. Alumbaugh" , Axel Rasmussen , Ryan Roberts , Kefeng Wang , Suren Baghdasaryan , "open list:DOCUMENTATION" , open list , "open list:MEMORY MANAGEMENT" , "open list:CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)" , opensource.kernel@vivo.com References: <20231009025726.5982-1-link@vivo.com> From: Huan Yang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR04CA0183.apcprd04.prod.outlook.com (2603:1096:4:14::21) To PUZPR06MB5676.apcprd06.prod.outlook.com (2603:1096:301:f8::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PUZPR06MB5676:EE_|TY0PR06MB5756:EE_ X-MS-Office365-Filtering-Correlation-Id: 097ff8db-c5a0-478c-abff-08dbd04b9f8e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gr3NamqVEp4UaeRpQ45LO2LpqoPIDxkCE+ZhaUkO9eJlFX2SHxMgemau90CtGc94YyVVGsaA/S+seGtXogF9sHrt4eU6Ll8nEip+YR4hkyeE5lNiz0/x9RPCjljIpoAt1xNu7koAezNSZxP7mOv4hbeInBOEY141Ep2x0pq4pO47Hh0sh38VFFtj7K26dcDC82LkhSsRagNpQG2gZ60wRHL2w3vrke3kSBvAQ42iTmfrc+I1oAMDH1t7pe0hNnjbRKuHyNuRj5qntDOIKX3b4SsxfHqCAArq0FQaia3P51KOA8ZCnQR++Pr5L8vqof8bBsngFu4nNfHKoI1et8f9qdjR4d0WgbLELdw6USI8xKwbw66p/26vk7OrSG/NDUniyqj6NeXVztIYKQkZrjdSX1DS/cgx1kQ0b1w/hLTnxp5RHL+RuYh7l5kxftOE1u0M2RTt1QuMJEvSFEJeHxdnWzOGKmm42T3pB7xKQH7/wMpORJoxQa0WaJuuuM62UUpv9EZO+cLbNiJrEiK2AY3wRpw6cwKAzPMXfqtRSsOQF6YxUMqhgoYkExCTaXseaQo/G5kpZC5VvNSoQFGmkTTHNToP/v1LJ37YLRY2oOQ1QJmJQjoHgmNK83PTXQUNVPc3bPCWllkh4BfXmoptxzaZrux8ualDQWet6nTE36z3r3R+xGW+oc6VK69/RWE+MefA 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)(136003)(346002)(396003)(39860400002)(376002)(366004)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(31686004)(66899024)(2906002)(7416002)(26005)(5660300002)(36756003)(8936002)(4326008)(8676002)(38350700005)(41300700001)(66946007)(54906003)(316002)(66476007)(66556008)(110136005)(86362001)(478600001)(966005)(6486002)(6506007)(31696002)(6666004)(52116002)(53546011)(6512007)(2616005)(107886003)(38100700002)(83380400001)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dWw0YWp5Y1diZWtnd3A5VUhQby9ZRjdLSzFOVDYydU9tM3FIaEowZXV4T2lX?= =?utf-8?B?a2MzWlhyRkt5M2d4eVJJb0FWMnZ3WXRtN1BJY2tzZjgxUUlGVUU3bkkzZE5M?= =?utf-8?B?alRva2VMWkdKMldHMzZVb01mN3N2R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F4?= =?utf-8?B?US9ySU45bVU3N0R4Q0o3YzhHWEpsUzA0NmNvVzZNUE5mVCtZVlZ6cTFxd0tB?= =?utf-8?B?R2dCbllwMldJK0kwQnhBSDh3aE1vVVVkeGxWZ1VsK01NRDRwUlNkWEZwWUJP?= =?utf-8?B?OHYrUHl2bkg4aUl1aGdtQkZqS3J2bmEvbTZDV3poM1pKdWJHTERUajRvcEpV?= =?utf-8?Q?3X15lRu+XZcNpNxmt1PhB6bMz?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 097ff8db-c5a0-478c-abff-08dbd04b9f8e X-MS-Exchange-CrossTenant-AuthSource: PUZPR06MB5676.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2023 02:32:22.3433 (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: aVQpWOMLi6FPXTs0A6lqvvrhvRHArYI7A8UgQQs3BLLtDi085LwcG7YCdPSKowBbE7jU8GhROoVaO1x4PUndaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR06MB5756 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Wed, 18 Oct 2023 19:33:49 -0700 (PDT) 在 2023/10/19 3:59, T.J. Mercier 写道: > [你通常不会收到来自 tjmercier@google.com 的电子邮件。请访问 https://aka.ms/LearnAboutSenderIdentification,以了解这一点为什么很重要] > > On Wed, Oct 18, 2023 at 9:34 AM Yu Zhao wrote: >> On Sun, Oct 8, 2023 at 8:57 PM Huan Yang wrote: >>> 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. >> Adding TJ from the Android team. (The other TJ you CC'ed is from the >> ChromeOS team.) >> >> This series introduced a new ABI, which has to be maintained forever. >> How exactly would it be used in *production*? >> >> Android doesn't officially support memcgs. So I want to understand the >> real-world use cases first. > Not sure how Android came up but I'm happy to chat. We want to turn on > memcg v2 for Android but I'm currently working through perf impacts > before that happens. Android can't use debugfs in production, but I > think we'd prefer to use memory.reclaim for eviction anyway because it > respects memcg limits and reclaims from slab. Yes, shrink control this actually can use proactive reclaim. > > So maybe it's possible to add just aging functionality specific to > MGLRU? It'd be nice to know how you're going to use the aging, or why Due to debugfs not always mount, if we want to now lrugen's info, maybe nice to offer a memcg's node to show per memcg's lrugen info. > you want this version of eviction instead of what memory.reclaim does. So, this node not want to instead of memory.reclaim, it's good enough. age or other control just flow debugfs global node's behavior. If no need, delete write is OK. Thanks