Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp800358rdg; Fri, 13 Oct 2023 01:06:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEUhuQom/jkiMkOlnIkKuBwbu88eBdWSod8zU8cF5tYBpoCv/lQ38o7Jy7KaxocUMyCECgu X-Received: by 2002:a05:6808:d4f:b0:3a4:1b66:5494 with SMTP id w15-20020a0568080d4f00b003a41b665494mr33392411oik.44.1697184403967; Fri, 13 Oct 2023 01:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697184403; cv=none; d=google.com; s=arc-20160816; b=hW4vftTZw8nrPN963tvqcaaMTtSLQy03vr19TbBikN2CKxpQ6M1biFTyWEerQkCBFy qmNTJh52+WXHxbhi0pW3GY3KKo0Bdi1zaJ0zP3nUPKpvl9tXvfDjDrQLHdCJ5E9ywniZ 2MPZw2EcrSDp1laHLWRfekxddgvhaZmW3e/Ns2dzJtBcZ+zb7LoUAq+NCWj3oyDjpgBc it7D2WibTkO25+NDVC78/YsPGpLfui14pIiLdGnU18Kqx/kmZ4GZqRDp5E/5wbiCL4Bq JfI9MgzTS9aFIS5DsnMW/oTix7M9ycJVB10iak758ntm2yECy/p/oWPKs106kx+j5FKm vncQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=OBaUkWG9J3apSizB+NsKQOuu0IKcHSFNhRVgtXFc2Yk=; fh=rfwYGL/xMuytw3udAx4hGNmVrXnFnOadgW52YT9hCAw=; b=wGY2hcgxFpPEYNR6He8ETHGcQQqj1i5JYmWS6u+xVDC/cLdIufwADvVVCSg4QP0US/ Q02Xkdquu/ExyCKa+/iDKG0s0Qq2Aj60iOJFSMy+Qca5KnEQ6s5FTX53+ocx1Wcpf8Qy m8v3sCka4pfsO12nM7S+vQ7xwvH6DN0LEtVNKvbJgDfnS08THmBvN49h00xeltGLOOEx wI5gHp//dx+B/T+f9bj2OnWnVl5uX+MH2gMXOPVcxYuVvu0U6QuHEM47/6jc2PRl+4JE xuDfRjyipRnOnfBsfxu+/mrcrn6DyAWOiGOqXVtjwqgagMK5vbn95Awmo9VeL851FY/2 BnCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=e59yyw6+; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id p12-20020a63f44c000000b0057c24bae994si3953895pgk.355.2023.10.13.01.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 01:06:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=e59yyw6+; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id DD33582664E0; Fri, 13 Oct 2023 01:06:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230032AbjJMIGW (ORCPT + 99 others); Fri, 13 Oct 2023 04:06:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229884AbjJMIGQ (ORCPT ); Fri, 13 Oct 2023 04:06:16 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A97FCC9; Fri, 13 Oct 2023 01:06:14 -0700 (PDT) Date: Fri, 13 Oct 2023 08:06:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697184373; 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=OBaUkWG9J3apSizB+NsKQOuu0IKcHSFNhRVgtXFc2Yk=; b=e59yyw6+xMgAiFzup1SCDx7Tr3kxwbMhv0r38xQKVSQoE2mESiWBM3USdCiAn7CPEtO32P bZS0J6rjdCT2YyhTOstteaA4zW9pyxYDXFAuKvPFiSgCgXGEpWcS/IX8j+fN6vyGculKkZ iUbmWvvzdEe7fJZt0vEUGviAJWjJdntttLv5isjZHT82iXAjzioR+ZiEVmkgwAQznoIMK6 PE2odCSwXMegXwR2xZwVME44J+SYk1gYYc1wgHueTQSCDHm8IJMHyJr+6rRvtVshXHJW65 SCrtx5g0UOQXG11WrKfNIzRadBtsXUwVXiDeOl7ft3rcXoO2ARwmgW70x5JR8g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697184373; 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=OBaUkWG9J3apSizB+NsKQOuu0IKcHSFNhRVgtXFc2Yk=; b=EZWI+CC5Ik1bgDyrvw6SehZXmDsOP+elnBTv89uG0m9ZRdZw9rDFUPrmUDMIKMGqcdU1IB 2x7aUOK/sJg61+Ag== From: "tip-bot2 for Haifeng Xu" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/psi: Bail out early from irq time accounting Cc: Haifeng Xu , "Peter Zijlstra (Intel)" , Chengming Zhou , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230926115722.467833-1-haifeng.xu@shopee.com> References: <20230926115722.467833-1-haifeng.xu@shopee.com> MIME-Version: 1.0 Message-ID: <169718437261.3135.12208635380704050499.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: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 13 Oct 2023 01:06:41 -0700 (PDT) The following commit has been merged into the sched/core branch of tip: Commit-ID: 0c2924079f5a83ed715630680e338b3685a0bf7d Gitweb: https://git.kernel.org/tip/0c2924079f5a83ed715630680e338b3685a0bf7d Author: Haifeng Xu AuthorDate: Tue, 26 Sep 2023 11:57:22 Committer: Peter Zijlstra CommitterDate: Fri, 13 Oct 2023 09:56:29 +02:00 sched/psi: Bail out early from irq time accounting We could bail out early when psi was disabled. Signed-off-by: Haifeng Xu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Chengming Zhou Link: https://lore.kernel.org/r/20230926115722.467833-1-haifeng.xu@shopee.com --- kernel/sched/psi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index 44a7877..519bc92 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -998,6 +998,9 @@ void psi_account_irqtime(struct task_struct *task, u32 delta) struct psi_group_cpu *groupc; u64 now; + if (static_branch_likely(&psi_disabled)) + return; + if (!task->pid) return;