Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1688192pxj; Wed, 19 May 2021 11:29:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8o9B5Wjz2cbbZ4ODY6ux2r7ITcdnbRf8yW348Sq1RArD7qD8rGy3KX/qZYcDtg3dlaVK9 X-Received: by 2002:a05:6402:4310:: with SMTP id m16mr385280edc.279.1621448993782; Wed, 19 May 2021 11:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621448993; cv=none; d=google.com; s=arc-20160816; b=Q1kkGg1I26nHuZI9TyEzkNuEwG5qoI4pP3xqvfb3Q4Hxb2FtmGo6MWWTUZLPkVCCrp dQYvnJdFLlgVimS7PI+03RRJX9dTJjeGZYCQpi7fhk3lip9Xe1Ey7poOUYCj/j7f4mVA 0xuXRMnVXz0VP5hBIGlEwSfgOAz6uif9UQcWawFIU280AWLvO258nLs73UbvDiu2pFfZ +aFZLU2eaWDjgIt4I7bv2UsaJtKOtqtjWoZK3WoyDKZNbGpx4HH9Ynt4qKlsoxZ3+y4j hbHD7QUW0W1Ss94yn3YurDsdm1EEWAAZnavDt6WVL7XBru+/JF58ULgerxuOCdXjLebm ItWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6E7Z7TDc06/eMEz9G837ZKMVJn1ufiTnEi/jaPd1NvY=; b=tainlRGHRUmuBx008137+mABedTk/kcO3CG4LDf3gDtKb3COOJbiP/E72fBA1iGyhU nzANgZlTYWtbGhsMAWqWewZewcYI657zZW7bu/hmY04V59DYLPyHm08dx9j3gS+w9Ovs 2YzM2fztLBEqpul/hpSM1mxVbmJwEe3sAZ3dLDGVyOQ8uwTvnsbmny2H69q0cGHuhIu6 RI67luVCb9J0ZyDQB6jrrofnE3vAQSfAudmsDq6htGH4ABBvYhz5QofQrizMnvPrS27B PQSjQOaSROk5v6BkGK1xWlFAZgwR25aznTDGieNqd3Mli0Z1ns81qrNxGT16Z0wb//mg /SoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=wOsUI1tg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n8si454256eju.30.2021.05.19.11.29.29; Wed, 19 May 2021 11:29:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=wOsUI1tg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1351459AbhERSJj (ORCPT + 99 others); Tue, 18 May 2021 14:09:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346898AbhERSJi (ORCPT ); Tue, 18 May 2021 14:09:38 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2626DC06175F for ; Tue, 18 May 2021 11:08:20 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id c15so12611345ljr.7 for ; Tue, 18 May 2021 11:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6E7Z7TDc06/eMEz9G837ZKMVJn1ufiTnEi/jaPd1NvY=; b=wOsUI1tgO5GyceYANUg7bhK+kgPr8bEKnGXv/CrfjPyGFSLphMKWdlZbBEhK7JawBf VD4c2QD/2KMR0E1qrzCd8QMtksaO27A+uv8JW3OhfX3sgIO7YNQSvG7SBMKQu5+L4oyT e+jYaEtihbIO72lE8SQhtw1Kqu81Hhb60lIgHixmIpFlXHvyFghJ4FSyT2qOSKhkPN2B Ru9nHknSVzUt8GKlVm1bXVCs9/yj6iUBDkUShcRkSXiSUKjjyG1Ji+9RF32Qqd0FkesP mxQH2WbtbiAguRwQ3nYFu4iEy7nxrOU7RLTANf7M9dgJbX9r+B2cdYFpSwE9QrIPOOje EuvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6E7Z7TDc06/eMEz9G837ZKMVJn1ufiTnEi/jaPd1NvY=; b=ShUzpE85//K1qb4vVhrJsm19QLIQYByTjn0Sdib+MYGK/1tPdwPkDpfUd8YuH+n0Uw D2D+K1AvV56zaskvG0YzvfEJiWiHzr1gt6XeKaGD/3pcF550xfQqaP9vYsRKivI0dHRr HY7IUskqH9Oq5/nrB2VcHmVWMfLpnC8lnfR6qeoiOQEBCmlCbrIlJUtMusofjECD04oU 2Kul/vWp26Ewllh8cYgCznBdjjL7RxfzoTgWwyHx8lvHgFQ/8VgLkqRERWNz958+KRKo vNwOuxEZY6SmdC/faDnbskzYrp+I7u2ElDu5TaRyEMIZP8Ut9wOJbCrJBN8OIhgZAPA5 klGw== X-Gm-Message-State: AOAM531CMqQu/lLF20et0E2yvkiaQBysG3/1MEejdHK32mRm7CdR1C3+ VTP0mUdit3AN9Sjf/rDRS+pYzpHb96vj1QtmZlybZA== X-Received: by 2002:a05:651c:b1f:: with SMTP id b31mr5225520ljr.0.1621361298314; Tue, 18 May 2021 11:08:18 -0700 (PDT) MIME-Version: 1.0 References: <20210518020200.1790058-1-surenb@google.com> In-Reply-To: <20210518020200.1790058-1-surenb@google.com> From: Shakeel Butt Date: Tue, 18 May 2021 11:08:06 -0700 Message-ID: Subject: Re: [PATCH v2 1/1] cgroup: make per-cgroup pressure stall tracking configurable To: Suren Baghdasaryan Cc: Tejun Heo , Johannes Weiner , Zefan Li , Ingo Molnar , "Peter Zijlstra (Intel)" , Juri Lelli , Vincent Guittot , dietmar.eggemann@arm.com, Steven Rostedt , Benjamin Segall , Mel Gorman , Minchan Kim , Jonathan Corbet , bristot@redhat.com, paulmck@kernel.org, Randy Dunlap , Andrew Morton , Thomas Gleixner , macro@orcam.me.uk, viresh.kumar@linaro.org, Mike Kravetz , linux-doc@vger.kernel.org, LKML , Cgroups , kernel-team Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 17, 2021 at 7:02 PM Suren Baghdasaryan wrote: > > PSI accounts stalls for each cgroup separately and aggregates it at each > level of the hierarchy. This causes additional overhead with psi_avgs_work > being called for each cgroup in the hierarchy. psi_avgs_work has been > highly optimized, however on systems with large number of cgroups the > overhead becomes noticeable. > Systems which use PSI only at the system level could avoid this overhead > if PSI can be configured to skip per-cgroup stall accounting. > Add "cgroup_disable=pressure" kernel command-line option to allow > requesting system-wide only pressure stall accounting. When set, it > keeps system-wide accounting under /proc/pressure/ but skips accounting > for individual cgroups and does not expose PSI nodes in cgroup hierarchy. > > Signed-off-by: Suren Baghdasaryan I am assuming that this is for Android and at the moment Android is only interested in system level pressure. I am wondering if there is any plan for Android to have cgroup hierarchies with explicit limits in future? If yes, then I think we should follow up (this patch is fine independently) with making this feature more general by explicitly enabling psi for each cgroup level similar to how we enable controllers through cgroup.subtree_control. Something like: $ echo "+psi" > cgroup.subtree_control This definitely would be helpful for server use cases where jobs do sub-containers but might not be interested in psi but the admin is interested in the top level job's psi.