Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3014929rwb; Mon, 15 Aug 2022 16:11:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR4zNdjCr4n7IIGc6Ecst+wkLj3NhHn3JqpDNveSVupsvmFbHVG2imz8cLCEiZ4V3w03tsIJ X-Received: by 2002:a17:906:8a44:b0:730:9d18:17b5 with SMTP id gx4-20020a1709068a4400b007309d1817b5mr11581680ejc.378.1660605061381; Mon, 15 Aug 2022 16:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605061; cv=none; d=google.com; s=arc-20160816; b=g9HS/OznEZwM/TvZ/xi6CvlTXFYbOwjyJI26aetQ/V6/39aaw8dxHPXy9w+Og08bpR I5ApxJAxVIhepjARFOj6/wSuCNy3eAX8pJdjWlR8MDYl3EJKmhoTJFQmSE/KBlYwy+MX 6/H6gvljSoj9O36yDUdBjvPSGvOkoc1Tm3/YZMhd3HodCaOXOw8YmSn0Q0nxViII7HoB CVf8KjRskPUNzpyhkfrx3YSBnDflfB4yDBgQcLoV00Z8L1LMhZhylPcYsMmGvZQjcqjR H0vel7SLtneDnNmGPvz6MF4eAtZJhgZ37dWDVkqWBeZlYIB+EXFzEFoN69nWpips0w3K T1Hg== 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=Di1CBe/l3lFU1XEMEHMD/NMLKrrpGfsfoqHbgdL41rY=; b=ImCGEpZXp4omSV11/AQHacCVORLJlU6XF4RjYdai8R4MinE5CVItLJ4DtDVVw0lW26 gVWp2Y2w7COKNwYIpkMEdIJQ/NVECsr4YDaIaZizFphXUgORJ+UuhuPaenLBcRPJ6dsr IUqZKlk7Uw08N7G4CttS7y9blx1cSWYBHJLDeBNqZgFZsqadsj4keuMwVZ5w9cT0MZJg yNPg58yYLyLbOmUPqJLUFHwMw8QhNZ5JRYQH/4+QGazi3o2k2v+TpxYDM7CYeWPw4LZu aQWCE20h6NVkYybfD8KppTFODiiy/Zeq8SaPqyzBna5lddAeKhiz88Q6xYwxTjIzcS1e bNkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JuMvrFxc; 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 ej17-20020a056402369100b004439b1a0921si4089883edb.630.2022.08.15.16.10.36; Mon, 15 Aug 2022 16:11: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=@gmail.com header.s=20210112 header.b=JuMvrFxc; 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 S1351226AbiHOWlj (ORCPT + 99 others); Mon, 15 Aug 2022 18:41:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350817AbiHOWhL (ORCPT ); Mon, 15 Aug 2022 18:37:11 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED5681306AC; Mon, 15 Aug 2022 12:50:33 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id p18so7235408plr.8; Mon, 15 Aug 2022 12:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc; bh=Di1CBe/l3lFU1XEMEHMD/NMLKrrpGfsfoqHbgdL41rY=; b=JuMvrFxcpiKSsluaG1sm5UeOdp2pC3giGOS2OG59Y//fuQbFRfELDeH/pCcBIswiDf lZAf9nK/Y2R/Slxxx4YUgrO+F12ef80ywTcQLYTu8qeuofUcBPT7wsZnHVA+pr4+0/Cj 2tUC4IQVIStZaEDFenvFjtb8mmfyzTXMYIyz/i28Sb2IcML8EkxfwWRAP/3mhdWUdJG5 VVHotdeDOBc2ap2gYTcc16AbrAOrCJwUGwpW0kqck33YQQZ/msYuYMqPoV3dfpYUAbdG l7XZwTBXqp8itTZ6ESNEpnA/05+OnSneaC/vjjcsmmudVYim9hPHM6KvxdLxnmzlWVOM Qjxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc; bh=Di1CBe/l3lFU1XEMEHMD/NMLKrrpGfsfoqHbgdL41rY=; b=1SfrJUrADimY6sR5KcE/VuHa6d+C7K3gPr+r+TpiByTeV268iEsn0bk/q4/Mh8YhD1 jBEE0+ZaRwhZotL9vEDR+W9F+m+zf6sjhkgjeqZG1ROb3pJZ62lcrDXtO3rLGv97vD8k K2uT8RsIM5MDkf3dRf9Q1k7lTi66xYb8zPzt38tOVyChsDcQsghw8LBpAjFz7fVlonWj Hdg4AaQAWQTjWKSlSIg/7CUTDY689NnodX0fZijDipTEWSiy2oNV0Dq3AkP8ubNoSJl1 b9JM0i8XVSDLBVOu6MH6bVGFQHzGc5hs0xdBDy8l5n8xBU4aP8q+6doLa76nrRl2gMDA zlvg== X-Gm-Message-State: ACgBeo3twqA0ZIOefX3L9duv83XT54z8qr2i0Gm31Cj52JXAK2smUQ6X 0dzwEkGp7D2UYAe101pxxaE= X-Received: by 2002:a17:902:8f8a:b0:170:8df4:eebd with SMTP id z10-20020a1709028f8a00b001708df4eebdmr18681986plo.116.1660593032457; Mon, 15 Aug 2022 12:50:32 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:3a69]) by smtp.gmail.com with ESMTPSA id b14-20020a170902650e00b0016c06a10861sm7351319plk.74.2022.08.15.12.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 12:50:31 -0700 (PDT) Sender: Tejun Heo Date: Mon, 15 Aug 2022 09:50:30 -1000 From: Tejun Heo To: Johannes Weiner Cc: Chengming Zhou , corbet@lwn.net, surenb@google.com, mingo@redhat.com, peterz@infradead.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, songmuchun@bytedance.com Subject: Re: [PATCH v2 09/10] sched/psi: per-cgroup PSI stats disable/re-enable interface Message-ID: References: <20220808110341.15799-1-zhouchengming@bytedance.com> <20220808110341.15799-10-zhouchengming@bytedance.com> 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_NONE,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 Mon, Aug 15, 2022 at 11:49:55AM -0400, Johannes Weiner wrote: > I think it should also add/remove the pressure files when enabling and > disabling the aggregation, since their contents would be stale and > misleading. > > Take a look at cgroup_add_dfl_cftypes() and cgroup_rm_cftypes() The problem with adding cftypes dynamically is that it can fail, which isn't the end of the world here but still kinda sucks. I think what we actually wanna do is hiding and unhiding while keeping all the data structures in place which is needed somewhere else anyway. Thanks. -- tejun