Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10193972rwp; Thu, 20 Jul 2023 16:34:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlHl6bOXHCt/HfDckse4cHlbG2fn89rPqYOuLvv80hWcQOX84mRSxIuAZRDvFndCNcfoFvcj X-Received: by 2002:a17:907:2c61:b0:991:37d2:c9f0 with SMTP id ib1-20020a1709072c6100b0099137d2c9f0mr177039ejc.68.1689896041677; Thu, 20 Jul 2023 16:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689896041; cv=none; d=google.com; s=arc-20160816; b=at2442mQMk6scx6lNldUWBjErhyXFJKoKe5NSVdcS5CuL/pXPGczxKX4t6a8hpXuq9 pbjKw6wObstM048B1FbnN0KfpglmnLntbLprETRrovAsf8MvgUlCeozmkz4OadWtGW7+ EDI2B+JB9OfHGsvl/YQbaY8Rmkm2RAUMjacrnXM57zgi8tm4xidWB+z1bVQY/aV9FKlU HL+Fhx74ZVBQ00QTyMhnuc1PGKOShez6Y39l0G3Q9gJJ3+8/NFjAhiTSgBrA9zTjXMz/ 1zgYuWS8WEnQa4FgMIVqIdoUPyGgryHZryP1kKXCMeSL3I7kRPgq0llgluArSMQi0Tpz l1vw== 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=Wla3efE6JyGPdqvNC8P15XtJgOh6q0zRuJGb6WkYFkU=; fh=hA9neWplXLF/EyobYwbHy6hSCQ+bZVhSRMrSFuXUhJs=; b=on0BFQfLz/CdAnUW2+9wqWnC6SwsyMQlR1KEJyUiIWSiHnIg3Jfmza2ZbYu+7hBV8R gskz5APCUdRfi6FnT/Hy51bO3/7cRi3pFLu7AIVEXcPtgTAWlhl5gryej3iJLoNsjDFB +jEaBdB7HQyGxaWoitGskTitiWSSRzqyYDz+1ndm/mszx4xCykY4sXo9Mvork4pIgSRt En42gAtCpo6N2/T8WlD5NHQja/pXQ9+JeCRpq12Dm6b8CkfOXxB6JN9gNFfOhgg8ZkXH 9ax4FUzLDF3LZJeWaWkfK1O7sE4blQr1hIpLLxE8SsZ0KEMWDSf05y25xk7tfA9bgZPX ALiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="ZyqL/pfs"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x16-20020a1709064a9000b0098804fbcff0si1258894eju.709.2023.07.20.16.33.36; Thu, 20 Jul 2023 16:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="ZyqL/pfs"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbjGTXY7 (ORCPT + 99 others); Thu, 20 Jul 2023 19:24:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbjGTXY6 (ORCPT ); Thu, 20 Jul 2023 19:24:58 -0400 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F4EB30D6 for ; Thu, 20 Jul 2023 16:24:30 -0700 (PDT) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-5838c63968cso3244437b3.0 for ; Thu, 20 Jul 2023 16:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1689895454; x=1690500254; 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=Wla3efE6JyGPdqvNC8P15XtJgOh6q0zRuJGb6WkYFkU=; b=ZyqL/pfs56dYsjzgW1sC88OX6ea1yYxnkLNnDI3qkpD1FfBIuqlzveXINQdKsv5k/L b2hWGu0BSe43eg7hgztFXLBLiWGR5sElL2WlIU8IWQba5lCaD4QHi2h585ZS79ells+d EyYJPYuffXS94IYaIaFx2HapRRKi7Fq8ooPOzLLb2POx0evTUdrmNqgOETvS6AbjTz7Z c7qnuP55qbCcv2pgvn6TUwH+46rb4fwqMSdQUAgZYHLo13hDnxfK38H5hjC2TMZl6ldF /QRVPbyCjd+D1wZv8SxRGevdUw+z00sMJyXtuRO414Fp54C7WEsXKxMEiB2sLuiW18fE uFEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689895454; x=1690500254; 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=Wla3efE6JyGPdqvNC8P15XtJgOh6q0zRuJGb6WkYFkU=; b=h56Mb1O2V8V1cqqEUVLovbHv1ixwa7MdwOa9+6WYj82xXWGQt4fxbKpn5uCG1b9zEa gK4gf1skgO5Pm/qoH9HRs2X1n2ekyMyQiw22SbVuOBqn/lfjM0ytnfqXmWggz+HBJS7e A6+3KdRAQj8qRf/cMQ8i4fDt/MJ04PW6LIL+FPkkuGUeWgGq9vd1lipMOpCEfVDIGF8V h+lko5FaJcK2gZscO3huupfQbIC5gWJ6VoOBQzc4LzIgDyq0bv+BkqLxXcMe+09um7vL jQJIlvigeILb7uxYjuOi3QkmH+qkrqofjt/BPlHWZts5USg24FzB7Z0yZ9SKe+i717hL itGw== X-Gm-Message-State: ABy/qLYsStyoNOpaADnIGPjbUJzBluElvEduOf+aLbsDu6y/e3UI2buo 2/sJCgB5G6/NPeeFgq7DgPcjR3/oC1vnQFOoJLw4GA== X-Received: by 2002:a0d:d646:0:b0:565:9fc7:9330 with SMTP id y67-20020a0dd646000000b005659fc79330mr530144ywd.17.1689895454153; Thu, 20 Jul 2023 16:24:14 -0700 (PDT) MIME-Version: 1.0 References: <20230720070825.992023-1-yosryahmed@google.com> <20230720153515.GA1003248@cmpxchg.org> In-Reply-To: From: "T.J. Mercier" Date: Thu, 20 Jul 2023 16:24:02 -0700 Message-ID: Subject: Re: [RFC PATCH 0/8] memory recharging for offline memcgs To: Tejun Heo Cc: Yosry Ahmed , Johannes Weiner , Andrew Morton , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , "Matthew Wilcox (Oracle)" , Zefan Li , Yu Zhao , Luis Chamberlain , Kees Cook , Iurii Zaikin , Greg Thelen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Thu, Jul 20, 2023 at 3:31=E2=80=AFPM Tejun Heo wrote: > > Hello, > > On Thu, Jul 20, 2023 at 03:23:59PM -0700, Yosry Ahmed wrote: > > > On its own, AFAICS, I'm not sure the scope of problems it can actuall= y solve > > > is justifiably greater than what can be achieved with simple nesting. > > > > In our use case nesting is not a viable option. As I said, in a large > > fleet where a lot of different workloads are dynamically being > > scheduled on different machines, and where there is no way of knowing > > what resources are being shared among what workloads, and even if we > > do, it wouldn't be constant, it's very difficult to construct the > > hierarchy with nesting to keep the resources confined. > > Hmm... so, usually, the problems we see are resources that are persistent > across different instances of the same application as they may want to sh= are > large chunks of memory like on-memory cache. I get that machines get > different dynamic jobs but unrelated jobs usually don't share huge amount= of > memory at least in our case. The sharing across them comes down to things > like some common library pages which don't really account for much these > days. > This has also been my experience in terms of bytes of memory that are incorrectly charged (because they're charged to a zombie), but that is because memcg doesn't currently track the large shared allocations in my case (primarily dma-buf). The greater issue I've seen so far is the number of zombie cgroups that can accumulate over time. But my understanding is that both of these two problems are currently significant for Yosry's case.