Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp4036030rdg; Wed, 18 Oct 2023 12:59:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFROQyMCb2ZuUyx3EwlM2hf+bf8jgskpW0c0mpNn+v0DwgZSpOAcNQECChT8b1xQfomrlUf X-Received: by 2002:a05:6a20:f39f:b0:163:a3ce:a699 with SMTP id qr31-20020a056a20f39f00b00163a3cea699mr140442pzb.57.1697659180942; Wed, 18 Oct 2023 12:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697659180; cv=none; d=google.com; s=arc-20160816; b=GDRrjnSYZ7/83rcYbHT7T7e/S1q/ewQMF09zRSU7UMBzpfVELaCVuQ+UMm381QLdDg JuWYBbA8sUYMmQHD2N9ac87eY/digFUyXbJyn8maAgnkjigKCz1UEeGbrbHrNQkG/+fo 0/ziP4mFvOopYiliA2GS5VPRcVzY8Sz0WJJlGJiuHUWf75RkIf+bDsYurgzKYfNjZ8DG FPp52Ye1YrsuGoaD0Zt7bcTFs4OB7NOwAp1E8JIfwoOdHuKxNBIZItfUJkH8PZ8oIXTR fbJXw5z/a9E6Alwx5/kKp4S6mhfBIGgL3FafYz0Bj6plTmDJDsHx4l57P5LZPI6tBH2T GFwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+zmqcE2MrSI+P6n0BrJLpbbDNn5j/j93ikaoJl73i9c=; fh=Vy6Y/Ga2w/F2zNYIq5u8VMD3rt2YF9ugPi6/Rg9pdNk=; b=Cz41nIjXdk/GrvXCjAD8fTLBYAReOPcbBUqRn3TRfslpuCHmOYgIJuBUSuA0Y6bmio x0WNsFCStvqPQViPOv9OPMInY99yeE7VqmNut1gAplKrWnonj1dbSrcS9b5pkiYN9nlE 0Vm0EtoNPRtGccyqJMlf4x1L0M8GEp0rInRbMz1gRlCg8Jq1bYeE/7oWWsi7hBThhRyS JY5PTSEZlhtXq+NPk8LEtXq1ZONGcMxkNVxO7qkif4+eyHIyYtmy1dtgy+cJMjSupvTm krqXdYOOaTcRK15htDXGKTUHzF61+uGOFFyiSMUa0kv0P0RzhjjJ5jGzeNQzRuEkeoVk n9iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=QHm9LaFO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id e9-20020a17090a804900b0027d1a77c766si502678pjw.118.2023.10.18.12.59.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 12:59:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=QHm9LaFO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3A7908246E3C; Wed, 18 Oct 2023 12:59:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231657AbjJRT70 (ORCPT + 99 others); Wed, 18 Oct 2023 15:59:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbjJRT7Y (ORCPT ); Wed, 18 Oct 2023 15:59:24 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83F3895 for ; Wed, 18 Oct 2023 12:59:22 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2bfed7c4e6dso94906761fa.1 for ; Wed, 18 Oct 2023 12:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697659161; x=1698263961; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+zmqcE2MrSI+P6n0BrJLpbbDNn5j/j93ikaoJl73i9c=; b=QHm9LaFOQhR8fbtxcBgw49NK1lUN7rkIh7niXsHxORelHLL35/MeQgW/+PD7sNl0f4 F3mkDESpT/keIC7WGq+17h4h5ZFR798o9FNyufDgAyZTt0qSNV5oLyBMptYsllsKTzA6 +FYUmb+qqQ1GB2KaiD1fHpjC1cZqmGuY+/3rYU30eL+0Y1UbzqDHc6v4A6owGD3fyl8i 2WsNXVl9a6Y79CdSRSR21GfYVTfP7gWYyKqQDasBQtYPnjmGv/UqWicHKD8Th0pNqQiD CYNcfV2gRnpDYLxadGXfn0s1KYn8POJ0Knt3BNGSn5pu14zqbhc4mttH7m/Jp4CkLlak cPYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697659161; x=1698263961; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+zmqcE2MrSI+P6n0BrJLpbbDNn5j/j93ikaoJl73i9c=; b=kle4Ce0esNbfOTNpeG0QwZ2r1OgSaEhZObwTFXpWnJp0c+Q/YuDEjk7Ol4BQJRfs6F 1MjMbKb1Uq9IMir5uUusUjkUDtn6MBzKuM01tcCiEwRqX6iyv7ILMLjvt6e8SG33pfmZ cnHsR62PpWp8OOvgc4dTEZPHjPuvHGeonnulvG7DnYH8ftNOtjLvE6daGmtfnySNNflD QlFInbwWW/gZHgm/GdulDT5PZVx8/XaOR4jN8y3/PCrW2uZdi3XIYhJG5agySyf1RJmq pOuIM7N8T0E0xET48KzrGfLuMpsnWgaDD+//h1QvkUWNPnknPMyladFItNhuiXsJToDp vWxg== X-Gm-Message-State: AOJu0YzJXLhyokstE+9RLcJAwsIb7x+Tw3V43oGYCXyBd7+23oNbdb7z PGFRx5ycb0IfYBSmJMjkpJuVKj4AgioOs/Qltm4WNw== X-Received: by 2002:ac2:53ad:0:b0:503:55c:7999 with SMTP id j13-20020ac253ad000000b00503055c7999mr23973lfh.34.1697659160478; Wed, 18 Oct 2023 12:59:20 -0700 (PDT) MIME-Version: 1.0 References: <20231009025726.5982-1-link@vivo.com> In-Reply-To: From: "T.J. Mercier" Date: Wed, 18 Oct 2023 12:59:07 -0700 Message-ID: Subject: Re: [PATCH 0/3 RESEND] Per memcg lru_gen node stat To: Yu Zhao Cc: Huan Yang , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 18 Oct 2023 12:59:38 -0700 (PDT) On Wed, Oct 18, 2023 at 9:34=E2=80=AFAM Yu Zhao wrote: > > On Sun, Oct 8, 2023 at 8:57=E2=80=AFPM 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 no= de > > 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. 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 you want this version of eviction instead of what memory.reclaim does.