From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51E41C32774 for ; Tue, 23 Aug 2022 06:18:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239753AbiHWGSj (ORCPT ); Tue, 23 Aug 2022 02:18:39 -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-Google-Smtp-Source: AA6agR4M47/Yf8Et3r8O9o96m8U+PWHhEeW9jgpZEjIOsqKpb7rtFRp/rPaUtx23rNWLMFjQ6aj99A== 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 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.