Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3194053rwa; Mon, 22 Aug 2022 23:49:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR4oD5mch8ljSiG6Q5GEwo5tW7X+qwqOYxClRFiCdZiyE9j1iQhsWdx1B0C+/0oC1iK+CTIa X-Received: by 2002:a17:906:846d:b0:73d:86dd:2cd7 with SMTP id hx13-20020a170906846d00b0073d86dd2cd7mr4390499ejc.552.1661237362042; Mon, 22 Aug 2022 23:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661237362; cv=none; d=google.com; s=arc-20160816; b=M4vKr5p06aJTVsHaZ+xUNKY28f+8xuLjqcimrgE37L0kEVz8wLEYwXMCDr81zFwxbz DX4zNo2hdVNFaWCjrtEj09JNVaIUcBwDP4flC9IahwOryqF1qGLUSujS4Nmp3XiiQv2y R5eF5lFxSr01bXtb/szahnTE94iwREMkV+LnnThIMTWsGE7jgajJb4vCysbU+qObTEol 4x7yri0f8CNH9eV7i/Iw/jaMJ6BoBx6NodCt5WtWxBfMfGV9OAuJO75AAToDWFhGO5AD ifnAv8zN6PrQ6HlJubOhOU9Sj/IhNjYJDso+jUz5cpw5HyNnjr8ZjNe8Td32UjyL0uGS p4rQ== 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=3/lhotbB4Uar/lt4peIcoGTYHkX7iv9Q8q1pdoozNu0=; b=dtPaoBY4cYfPFF+PoBlokIiy5FrlIAbA6TySEUeCl9MxXfKkxQ50+TSRmv4yAi8ENC tFxvAAmMvpyGSmQmMvN6obg+dHpNa9eUdZ0CM1UMiW7gLwvYlbG7B8OTfoCBwORksoUW t2qcNYpait8h3IhFvo2DcmLpWF1sXDZTtBE5oV0EI+jT+2AxJ2O5r4cKd6fyy4jKuPsA v37d7Tonev6gtrivhpGPMP9iN1N9QbFB1G+ase70W5qhLg6KrtBlg0IVMN5L/toM9RtJ PO4CE7ZxBhkZUSFbkX/k207SM31IZSVk7uMN4t4P0ZDRR2PXupQ5gRwzAgV4g+kt8XdI 3KCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=HPvGXZlh; 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 b17-20020a056402279100b0043dde72da34si1749733ede.68.2022.08.22.23.48.56; Mon, 22 Aug 2022 23:49:22 -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=HPvGXZlh; 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 S239257AbiHWGSi (ORCPT + 99 others); Tue, 23 Aug 2022 02:18:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239166AbiHWGSe (ORCPT ); Tue, 23 Aug 2022 02:18:34 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCBDFBC24 for ; Mon, 22 Aug 2022 23:18:31 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id r22so11425067pgm.5 for ; Mon, 22 Aug 2022 23:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=3/lhotbB4Uar/lt4peIcoGTYHkX7iv9Q8q1pdoozNu0=; b=HPvGXZlhi0nU7N1qbXgghsfXNeuVWNupf6HJIuUeCRUD+8IoJow9QQ7ZaoAYF9g2+C hnnO0pM7HFbyVhJxv18B1ycqujMTc2vX71070Q9FFIBweuSgou7ZSEJMdRBijO0HA1/v FziVPVgeu9nU3FeEU+XGUMmiPxP6Tqr6OUBx2ErNlGlCivCeGIEakr0+82PSQi4eaz/D l2UYL0w2n9VktS8Ugo3FsCCvW+76y9QaTh8c387K5RFQD/DsfSQpgidjQvcDNGSloG4v naUMJYfoeUsvz0VFr0vC18XrBtpusuu0Zoh2D1f673+pqa0E0rBuJnPgWiIanuG/4h8S 2JVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=3/lhotbB4Uar/lt4peIcoGTYHkX7iv9Q8q1pdoozNu0=; b=ibuxdwaW7Dw2kJPjjOYCAV6xMki/wN3DTZAoogdo6gNXAaMfHAyvOo77NpqRvryyeq ILlUHjdZZjxWKl/0Y+Hy78TFjHKHeHA0knF70kepM4sO1Zf6l5juDLzgoDwq5UfMw5TK /KqffvIc3y15KjtOHgeRhHJXLAF/QzDcWhB0HntFt1jYVcR5VsNcv/OdECWsnvGfAtBh 9Q5QaUyjw3Z09/HakwI5nkdcunUEHQpZdhZxP8eeJUXcYtBokZhFUKnB9vLMyAXlh7I8 c4xbGB/cmmZaM0ac5Unm+T69HtGhYjzn0rFs3ygiLZp6Hpr/g+k4xfr52DieMsksewuk YV8w== X-Gm-Message-State: ACgBeo28GByZN6qeOZqf/l9/EHsyvKzkpyn+E79hdInjCS0qAZ/D98Ru 2Uf15NFU0K9W23GiMdJBUOqTBQ== X-Received: by 2002:a65:6d14:0:b0:41d:5f95:179d with SMTP id bf20-20020a656d14000000b0041d5f95179dmr19300579pgb.580.1661235511395; Mon, 22 Aug 2022 23:18:31 -0700 (PDT) Received: from [10.4.208.12] ([139.177.225.228]) by smtp.gmail.com with ESMTPSA id d5-20020a170903230500b00172ccb3f4ebsm6285338plh.160.2022.08.22.23.18.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Aug 2022 23:18:30 -0700 (PDT) Message-ID: <9d1997a4-9278-07bd-7f57-952306b28b14@bytedance.com> Date: Tue, 23 Aug 2022 14:18:21 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [PATCH v2 09/10] sched/psi: per-cgroup PSI stats disable/re-enable interface Content-Language: en-US To: =?UTF-8?Q?Michal_Koutn=c3=bd?= , Johannes Weiner Cc: Tejun Heo , 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 References: <20220808110341.15799-1-zhouchengming@bytedance.com> <20220808110341.15799-10-zhouchengming@bytedance.com> <20220815132343.GA22640@blackbody.suse.cz> From: Chengming Zhou In-Reply-To: <20220815132343.GA22640@blackbody.suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, T_SCC_BODY_TEXT_LINE 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/8/15 21:23, Michal Koutný wrote: > On Wed, Aug 10, 2022 at 11:25:07AM -0400, Johannes Weiner wrote: >> cgroup.pressure.enable sounds good to me too. Or, because it's >> default-enabled and that likely won't change, cgroup.pressure.disable. > > Will it not change? > > I'd say that user would be interested in particular level or even just > level in subtree for PSI, so the opt-out may result in lots of explicit > disablements (or even watch for cgroups created and disable PSI there) > to get some performance back. > > I have two suggestions based on the above: > 1) Make the default globally configurable (mount option?) > 2) Allow implicit enablement upon trigger creation > I think suggestion 1) make sense in some use case, like make per-cgroup PSI disabled by default using a mount option, then enable using the "cgroup.pressure" interface. But suggestion 2) auto enable upon trigger creation, if we hide the {cpu,memory,io}.pressure files when disabled, how can we create trigger? Want to see what do Johannes and Tejun think about these suggestions? Thanks.