Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10158573rwp; Thu, 20 Jul 2023 15:56:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlFPbB3reNg9Ejo7UmDzBC+nYkN8G6YOEH9qbVcR5oLBZMXOBX7OYT5t2j8SInPI5CONTkfM X-Received: by 2002:a17:906:739b:b0:99b:65fa:e30a with SMTP id f27-20020a170906739b00b0099b65fae30amr132883ejl.32.1689893773442; Thu, 20 Jul 2023 15:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689893773; cv=none; d=google.com; s=arc-20160816; b=y8BBbK1eqv3uC5i21MGUZaA8e+KGs4DFo7Oq7lNmBydKj1WUxeCsGPW+GOFPCwGTC4 JQavJ31H3PW8MZZMr5Sz34QrTKJcFEga47nNhFsEPmgYg3jVPi8V4cFjVA/bO4fp1Wxg 7NbRhusO3mVvByOPnqg1nH295ak76Gp4ypk5KjUICyv2tbzIQ35eNwfswTb3Q9XvXVM7 duWYAYjtR+Bq7zsS0gcRVK4ZQ0vrZjt9O28EzOxC8HYSkOY6/iEoMCIzghETOk6zK3Pr hJN55EIoWTBsvFnzCE50HLVk8xefqFtA2UWuuu2K0cRGDyDzA4WSYWn6bLUwIO/n8cWJ AoTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=NZpl8s75HuZGEhNzUvLR3L4qywqf/Lpjo/SjREf5tA4=; fh=SCwsqN2ULYPOVetMiP4evZzfXVi9Vxa0nfF6kSzIwFU=; b=bleWjLKZXdIhRM+2RgGS27DcUg4qF5/QAYtpT/TX6zGSCYp4QqcA72GdwRVm1PLzhj 8STAzhHj3d8omMEJCRS8J5hapNrq+caCeIVfH7hvr5dih1SRJ020fC056t7wn9N3J4U+ nHNtJzdfvhLASxlFU9DtC/vY85CxqxqkL2JjQY3Iv90Ije+skz4eRnP98fj1qAB9sB2G N3A4sMS3gzxxFntQQ3UUb9+8bXXeiYID+hbDi7K8RdRN/8E8xX8IOa+YOoYGmsk5kEQf 5QXzy8I+MOhkp6oqW0g0w/jE6gfaGMsHwumqwo+cKAWaPpbbbotDaFBYTTrClOmzy2Uq rqMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ghf2BigS; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p8-20020a1709061b4800b00997e7d9f57fsi1348197ejg.376.2023.07.20.15.55.38; Thu, 20 Jul 2023 15:56:13 -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=@gmail.com header.s=20221208 header.b=ghf2BigS; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbjGTWbG (ORCPT + 99 others); Thu, 20 Jul 2023 18:31:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjGTWbF (ORCPT ); Thu, 20 Jul 2023 18:31:05 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D21D810A; Thu, 20 Jul 2023 15:31:04 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-66f3fc56ef4so1697025b3a.0; Thu, 20 Jul 2023 15:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689892264; x=1690497064; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=NZpl8s75HuZGEhNzUvLR3L4qywqf/Lpjo/SjREf5tA4=; b=ghf2BigSLopuzIAO9mo5bilaWUW4pw/MFFRLacsY7gWLDlVj9giiAM8MRIJR4yUUN1 0eZXp+66XIpghEylgvGqAISiRJtWYiAeKFk7WqWG9YoONhzF7W8uockvwN6JHX9P2ZkX 1WQhxBW7HjKnkQF7XhjgGOYKP2fXw2EG0F8J+r2UjwCm20cngLNEKgvq2w+1/xMghmP4 0F1mD2djp/qp+HRvQPIcmx4EbINiffoW4s2adiKXZS/QnQC/F3zsDi5AZw11mkZQfaLw JFzkRMQNS3a5BSHUM/Gm5XZF6bkZeN/kuIDV0MNaB/JLMC1CDfRMDUaljWa1nfZfBNCU Dtbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689892264; x=1690497064; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NZpl8s75HuZGEhNzUvLR3L4qywqf/Lpjo/SjREf5tA4=; b=fBP2iO6r/eY0GUu7m1CiKqzT6MMiwMMzubKuro+J8CCtXbjKhLerg+LBXg0KelEpXQ 0ylcAmkAHzUoqk5O30W5xa1rwE72J6AjL4tXxrBx8LJpZH7LB+mqtIA1vGPAic82z28U 1qyeqvj5/Cp0zRTxaVIWkPZ4Bn+CerI+3lM+W+JQ5DGivUkAzyn/OXEfuC+1RAd18ugU Tno4p0mHFGcK6PUu9psmBy5qUxYIlkgmWR5M6REP2vmPtwozS5TFCgs7wuLDE+KgKxea Nh+FlkeftNhDA58mMxLigyzjLud/uAKspyfu2jBriRm7N6ioAPB7OocMuG2pfmXbSZh8 5ZRQ== X-Gm-Message-State: ABy/qLaQvBJU/2Zknl7RgRCwcEDYVS/oo+SW8PiDuyq58BbI/muOY+m9 2ZLiLQJ6qPpgsgGse2hfKxo= X-Received: by 2002:a05:6a20:8401:b0:132:7d91:aadb with SMTP id c1-20020a056a20840100b001327d91aadbmr381237pzd.6.1689892264054; Thu, 20 Jul 2023 15:31:04 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:fbd8]) by smtp.gmail.com with ESMTPSA id d20-20020aa78154000000b00682a8e600f0sm1684817pfn.35.2023.07.20.15.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 15:31:03 -0700 (PDT) Sender: Tejun Heo Date: Thu, 20 Jul 2023 12:31:02 -1000 From: Tejun Heo To: Yosry Ahmed Cc: 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 , "T.J. Mercier" , Greg Thelen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org Subject: Re: [RFC PATCH 0/8] memory recharging for offline memcgs Message-ID: References: <20230720070825.992023-1-yosryahmed@google.com> <20230720153515.GA1003248@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 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 actually 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 share 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. > Keep in mind that the environment is dynamic, workloads are constantly > coming and going. Even if find the perfect nesting to appropriately > scope resources, some rescheduling may render the hierarchy obsolete > and require us to start over. Can you please go into more details on how much memory is shared for what across unrelated dynamic workloads? That sounds different from other use cases. Thanks. -- tejun