Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp704579imn; Tue, 26 Jul 2022 07:14:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vGeJFizhtogVwO8AW/rldGbLiQO6kaZvq0HxDKO/sSACbo0er5XatYzE9iT35DTaoZe7RD X-Received: by 2002:a17:902:f606:b0:168:ecca:44e with SMTP id n6-20020a170902f60600b00168ecca044emr17134643plg.144.1658844859196; Tue, 26 Jul 2022 07:14:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658844859; cv=none; d=google.com; s=arc-20160816; b=i59SHpjIxyaofI24d9Y2v4k6RlnxLWOPhHYgQh7Y3I82y2+6pZEjmqh/NtkHg/jaWW rQPfZ/cjhFql5lo75BFM3X2P7HVQ95Ti8cvNwWabvbRhe3vmAEFk0sD/H/Pbq7JZiBIe weQxVOfrHz7DLG3n4dc+cV6/S1A2A5DAtI9geDvyiPTo/lF0mIH34FGpRSEaEnzE8/Ej p1DBT/BDU8CoDuQaoEir8K5BQWrlyxS8oWWDVWWDydOkOhbPzc71J+bcfdhZA86NgFJO 37jmttmOOZKageNIQajySbQ00z8ocK4uLTHwEqhDQcieoHlaVztD4ExNSelt199vzWre XJ4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tmctZBFguTrS1b7yrub84YkQuENPO2e8gipTSbzISyU=; b=PeesZNQIDQykrg8ItRC15HNeQ6mMZvegGvH9XKncU+t1nJMUuOApDZyozVrhSfroqJ Cw+/mcLvcimAg09LPYSNxFM2Iss/vA/H+rInpZ0MVSxZuRXhocMiFb2kQnIlYU9QX4u5 SzcXjwwOGiYSO1vqCm+oQ9Fqd2Fgw/3SOMrrpp8O3GIGXVyJA9Gsi07vUJywJyosqo5E MS4JmdTCWBtJJUdQVysYbfWP+6dB9Q0oxPduppiPGmnNGQm6zeFZItyf+4LlwgOy5t9b 8Rw5aVWS+APegebhnJ2Tbx3chaSPb1IXXKG/B9bulF/oSx8a9eYWU5sVMpKcK1NkhSPb yOJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=fmzUdvxI; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u126-20020a626084000000b005061eb330a1si16597137pfb.351.2022.07.26.07.14.03; Tue, 26 Jul 2022 07:14:19 -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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=fmzUdvxI; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238972AbiGZNi3 (ORCPT + 99 others); Tue, 26 Jul 2022 09:38:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231154AbiGZNi1 (ORCPT ); Tue, 26 Jul 2022 09:38:27 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FBBB9FFA for ; Tue, 26 Jul 2022 06:38:26 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d10so13234465pfd.9 for ; Tue, 26 Jul 2022 06:38:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=tmctZBFguTrS1b7yrub84YkQuENPO2e8gipTSbzISyU=; b=fmzUdvxIgopv0HByWJp3GWf71zq/2KhCxgsN7JSU50LfrTaG85+Izym6Tk8RjqUPns 7y9QLsMx6dZ0PN/ksMUXgLHVdtm9xer5hIMN2AA760oK2BYKVCmjXEt0VTP8UO4wL4ER jpUqUvJqt3XBCs9UUjuBd6lR4T6WE0rgM2zD7qH1B7rNnwfKbwnstYSn3Vg1e2QK4XBP odPJhd1ETh9sbQm+nRuVeGJ/zPMUdLwL5O3KhETlMrBsxHTf1vEzUgqPBXLE9aEPXStx IA6EKzZinS/QP0aFF246XBW0oeybrj69iPq/6mKd8R6ZMUhJe0P3dn4iyjmrLshA4OxB Y56g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=tmctZBFguTrS1b7yrub84YkQuENPO2e8gipTSbzISyU=; b=kxgQszjL0ytfR1iVeJhQHPLVqn11YNKJzdaPppU6IYwkj79dyNkO2rh4vUiug3V3FI N19Kg4T3wzI0I1f9KPiEQvoY9m4sFddt9imeEtCSKNhVkEYSPFy2KQOJoYpXF5muS3a8 ORmz2kNkWD4ssP/679CzPJFn2Y2fG2MtcJ+xRyV4w/0BQ7cvk1qYLLu1aa6pOPvCdiq/ o4bfeuZ/1zbVr3FgJ4xb0aCOprXMIDHGHINtYwX1Ylhc7vayWaj7ZcHRTLEhOItm0l6l xeo2jbFjFr8hsGe8SUkOZOWPfHucHXcA9b6RbY8Oggn1kcBX2z5s1tqC9XBEXWKOmUmT J3yw== X-Gm-Message-State: AJIora9RcNu6GxYxSeWgNdck6lGp94sYLsw83YeetL+k3eajPA2D2yJj VXz+vV7zATDRQEz4hg/Hyar3Hg== X-Received: by 2002:a63:d847:0:b0:41a:dbc4:ef9e with SMTP id k7-20020a63d847000000b0041adbc4ef9emr11665683pgj.379.1658842705696; Tue, 26 Jul 2022 06:38:25 -0700 (PDT) Received: from [10.5.61.95] ([139.177.225.241]) by smtp.gmail.com with ESMTPSA id cp1-20020a170902e78100b0016d2540c098sm11470422plb.231.2022.07.26.06.38.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Jul 2022 06:38:25 -0700 (PDT) Message-ID: Date: Tue, 26 Jul 2022 21:38:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0.3 Subject: Re: [External] Re: [PATCH 8/9] sched/psi: add kernel cmdline parameter psi_inner_cgroup Content-Language: en-US To: Johannes Weiner Cc: surenb@google.com, mingo@redhat.com, peterz@infradead.org, tj@kernel.org, corbet@lwn.net, akpm@linux-foundation.org, rdunlap@infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, songmuchun@bytedance.com, cgroups@vger.kernel.org References: <20220721040439.2651-1-zhouchengming@bytedance.com> <20220721040439.2651-9-zhouchengming@bytedance.com> From: Chengming Zhou In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 2022/7/26 00:52, Johannes Weiner wrote: > On Thu, Jul 21, 2022 at 12:04:38PM +0800, Chengming Zhou wrote: >> PSI accounts stalls for each cgroup separately and aggregates it >> at each level of the hierarchy. This may case non-negligible overhead >> for some workloads when under deep level of the hierarchy. >> >> commit 3958e2d0c34e ("cgroup: make per-cgroup pressure stall tracking configurable") >> make PSI to skip per-cgroup stall accounting, only account system-wide >> to avoid this each level overhead. >> >> For our use case, we also want leaf cgroup PSI accounted for userspace >> adjustment on that cgroup, apart from only system-wide management. > > I hear the overhead argument. But skipping accounting in intermediate > levels is a bit odd and unprecedented in the cgroup interface. Once we > do this, it's conceivable people would like to do the same thing for > other stats and accounting, like for instance memory.stat. Right, it's a bit odd... We don't use PSI stats in intermediate levels in our use case, but don't know what other use scenarios are. If they are useful for other people, this patch can be dropped. Thanks. > > Tejun, what are your thoughts on this?