Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3891268rwa; Tue, 23 Aug 2022 12:00:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR6/M18Fm4gjaLKVLRBjhw1X0xSV+ibPYX+XMaivu/E5TFMnxPP0Adxtl0YCidO+Q5TdjP7p X-Received: by 2002:a17:906:3a15:b0:73d:80bf:542c with SMTP id z21-20020a1709063a1500b0073d80bf542cmr606911eje.633.1661281240441; Tue, 23 Aug 2022 12:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661281240; cv=none; d=google.com; s=arc-20160816; b=Ylvh1VcHFkatJy1PM+I0DT/DO9BFTm+lD4Jlz35v4y0ASGGbi5btK2QpBxRvPJmZvc 7bs1FxA6JN8AqeENTXqqkFoOLBi+jRsk1Kdx9l2dg5XTVBSQ4u9AcCDQnP+/aFX/TVp5 EQHbgRTLF6EulvCBnBSGc2WoRNNEHXwsUAMjFEvQ/nl1nia7ZalUIf+hO/TX31+6uo/s 6BendxiTgpLmfkVaGd9/xHNXJAAjJc47BFIb01v5pSXgZHGUmpJPExnBNDBXYHhic7zR t/pMta3y9smg5CQkv5Rdjk2iFBW5y8GnmstpGfscz1+f6EZcDdS40vmpIc31VoxMq3Pl RzFQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SYAHudUPI5QrzKudcquORH0On1C/OknqZBdmjmshgeU=; b=ZUphzAa5ID8XBVaYJ30WKMV9eXg+ZYLIoiX4yfxcwCw3hhK7OrfG9YO5yCuO4ZMWyD 0ar1IqSB5ddlW+Nxlc8ZbQjyiKdW251SkYEeemxjUWHf241YnTn1qTevb8Mb0CfeDSKL rs1ng0e7tM42lBDLsGUpQEO5hIO7htvwRkfIZlElKOX9f+VlPmr04q8EXEXjUH6S3zDe w2ZIVTmuyJxA7HQKC+5zo3L22qBnvLhiYHlenYJvJQ1Ho86r5r3jtw+TE+Mqe7DYOQ4n xykvymE+zRtUYVLICGrN8Pw4tcY3rdstn8zjlFZT5mHtVgm6Sq9TiNe3CylUXOXN8R6c zJOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=TqFj1ebL; 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=cmpxchg.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020aa7c745000000b004462b2cf36fsi106555eds.603.2022.08.23.12.00.14; Tue, 23 Aug 2022 12:00:40 -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=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=TqFj1ebL; 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=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230268AbiHWRoG (ORCPT + 99 others); Tue, 23 Aug 2022 13:44:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229876AbiHWRnO (ORCPT ); Tue, 23 Aug 2022 13:43:14 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ABCA6173 for ; Tue, 23 Aug 2022 08:36:02 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id v7-20020a1cac07000000b003a6062a4f81so9812168wme.1 for ; Tue, 23 Aug 2022 08:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc; bh=SYAHudUPI5QrzKudcquORH0On1C/OknqZBdmjmshgeU=; b=TqFj1ebLWjLYSVrPYFRfxKAk4n77SoNLZgCsLhn0knY5tExJE/V2jF9McNhX7QbXRM tsHXX5ZujFybQNyugpk/MKa89GXitAbOP3FmFpuxt4Slt9wrk1vRPJAlXS3AHz5OC0wP IY6ua704/P81xOXq4ZBiv2LeoGWa9Rv64tY5FkZomGZCjciVHs+0Qa8KeK5GXx6EUzHZ YYndDjyQghXOPttvHBtgaocZN97llsr5NB0k063X9ya9zlTx0VC70GZfgEOHisEVatHP zSEGKrtkandeoNYaCxVmhGi0XPphUdZglVUGQcP6MJCSqbn53eBBWj80kxWNGMMP5s/W R++Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc; bh=SYAHudUPI5QrzKudcquORH0On1C/OknqZBdmjmshgeU=; b=lM7iM/uq60CWq+XRHCzbrKVaVIJYGD+mktlCgaZ55Hf1hBh65SREad1GUlqR1jNP5H 53vwXZo4D4sfFWRd0wkRa54bSRJS6k3t+4twaN3tl0fGOysHPbSXTdGUGjeixTTUC0Gx GfvLKOFsgHHKzJ1Ib6MODQ6y7cUvXHe4YwfslnSlkIYbsLqHlbszHjkUOhNcMUmdMsvJ h5JfWbW34vIf79IVXHkaxgQ0QrdHxUZ/SsgAiN076BG1R3MsNP3nvthLeRX2OUy3Lz1h Q4MljtbPitP+MitdVtBQvS2rNtgiltIP0ONj/mH8rVUnyZCAJNs+geSk3RgaxBVLuW5Z QnYA== X-Gm-Message-State: ACgBeo1JyF5+fAX1hd84vrAGLkGcwDL8uC8h+m0tWAtM1XJKgyccMWSp YqERFaCTzSc/yJi7v4UKjkCS2Q== X-Received: by 2002:a05:600c:5114:b0:3a5:cb1f:6bf3 with SMTP id o20-20020a05600c511400b003a5cb1f6bf3mr2642833wms.65.1661268961233; Tue, 23 Aug 2022 08:36:01 -0700 (PDT) Received: from localhost ([2a02:8070:6389:a4c0:2ca9:6d59:782b:fff3]) by smtp.gmail.com with ESMTPSA id f2-20020a1cc902000000b003a5f783abb8sm20848646wmb.30.2022.08.23.08.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 08:36:00 -0700 (PDT) Date: Tue, 23 Aug 2022 11:35:59 -0400 From: Johannes Weiner To: Chengming Zhou Cc: Michal =?iso-8859-1?Q?Koutn=FD?= , 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 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> <20220815132343.GA22640@blackbody.suse.cz> <9d1997a4-9278-07bd-7f57-952306b28b14@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9d1997a4-9278-07bd-7f57-952306b28b14@bytedance.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 Tue, Aug 23, 2022 at 02:18:21PM +0800, Chengming Zhou wrote: > 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? Re 1: I agree. If desired in the future we can make the default configurable. Kconfig, mount option, what have you. cgroup.pressure will work fine as a name regardless of what the default is. Re 2: Not all consumers of the pressure metrics create trigger. I would argue that few do. So it isn't the best signal to decide on whether aggregation should occur. And yes, it's further complicated by the triggers being written to the very pressure files. If we don't hide them, we have to come up with another way to mark them as stale, lest they confuse the heck out of users. Without breaking format... So IMO, default-enable, "cgroup.pressure" as a name, and hiding the pressure files should be good for now while allowing to make the default configurable down the line.