From nobody Wed Apr 8 12:49:42 2026 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 DFAE3ECAAA1 for ; Fri, 9 Sep 2022 14:01:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232063AbiIIOBD (ORCPT ); Fri, 9 Sep 2022 10:01:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231912AbiIIOAW (ORCPT ); Fri, 9 Sep 2022 10:00:22 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E56CF72EFE; Fri, 9 Sep 2022 07:00:20 -0700 (PDT) Date: Fri, 09 Sep 2022 14:00:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1662732019; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x5w+y+WjNrCtV+Ss463MRTo/oExf3wBRmSDXnqwL3VI=; b=aa2XRaWI6M56kVKVEVRq6pDDZUZLzIEULOi8fFaDPWSMwNXNhjtX5C1ZjwfBXEAaXCOuqG +4w+R8UsITo6QIYOGO0gaIdv0KPHsmiS7NQG2vjZUgf7By6X2wqOHkhYUcZ8Onu+szkCic DbvRFzQqlgZYS2qJ6Enc+egO/rJ/2QRvlC2DkOOIYqxbMikjkf0U2cujbN1pY7+417y6Jc KsSxcd8XgGLx4k95vMe+sdg6r2opagNBJrykNaAld7ZAuLmslzXgz6EhBVnFHnUIschuCs YPs/6P2u9ZnRSPaZlgUrGfkSzqh6/ZryYkXc36iOkeBgSm2MoMYvklRvePjcEg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1662732019; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x5w+y+WjNrCtV+Ss463MRTo/oExf3wBRmSDXnqwL3VI=; b=zkBHfJqKO8CVVndRwDA+ZusxiF+K1yFzmqfd3tSjhi5j+M9TIsyLoHn/m4fZ+ExwBxEIQH fadSNIG/8HzPi7Cw== From: "tip-bot2 for Chengming Zhou" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/psi] sched/psi: Don't create cgroup PSI files when psi_disabled Cc: Chengming Zhou , "Peter Zijlstra (Intel)" , Johannes Weiner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220825164111.29534-3-zhouchengming@bytedance.com> References: <20220825164111.29534-3-zhouchengming@bytedance.com> MIME-Version: 1.0 Message-ID: <166273201827.401.2854791490008009050.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/psi branch of tip: Commit-ID: 58d8c2586cedb8a67f6f0dffa5eaed0f89135b39 Gitweb: https://git.kernel.org/tip/58d8c2586cedb8a67f6f0dffa5eaed0f8= 9135b39 Author: Chengming Zhou AuthorDate: Fri, 26 Aug 2022 00:41:03 +08:00 Committer: Peter Zijlstra CommitterDate: Fri, 09 Sep 2022 11:08:31 +02:00 sched/psi: Don't create cgroup PSI files when psi_disabled commit 3958e2d0c34e ("cgroup: make per-cgroup pressure stall tracking confi= gurable") make PSI can be configured to skip per-cgroup stall accounting. And doesn't expose PSI files in cgroup hierarchy. This patch do the same thing when psi_disabled. Signed-off-by: Chengming Zhou Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lore.kernel.org/r/20220825164111.29534-3-zhouchengming@byteda= nce.com --- kernel/cgroup/cgroup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 718a70c..96aefdb 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -3780,6 +3780,9 @@ static void cgroup_pressure_release(struct kernfs_ope= n_file *of) =20 bool cgroup_psi_enabled(void) { + if (static_branch_likely(&psi_disabled)) + return false; + return (cgroup_feature_disable_mask & (1 << OPT_FEATURE_PRESSURE)) =3D=3D= 0; }