Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp857940rwe; Thu, 25 Aug 2022 10:17:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR5SVETeQmEFR3eUba7XV1rRvCaWEfDJqqQTOE2fPoGYM/Pzu96S9vDk8km93nfXRzls3+fh X-Received: by 2002:aa7:88c3:0:b0:536:f035:ede0 with SMTP id k3-20020aa788c3000000b00536f035ede0mr16271pff.74.1661447855725; Thu, 25 Aug 2022 10:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661447855; cv=none; d=google.com; s=arc-20160816; b=u345jqr570f1+5c2FUIhibDG/YVXJJvvmLfYhmRwI3yVwNzG0hzJ8tyZnj9Ygec4Av vSc1PVEqkhJK+BXxi1HKJ12Ag/9uh8oNBstwYgQhK4SrWp81RlhBCAT+gpQhtCau5r14 nJBWfdS6TmysVvIFxZ6HkhszcVfxIFvO+/Py/GNN4JxnQQGXfTHO0xjczfx396JSDYAa j8G1rQ4NCMn26oKL1QPDfr8mm/WqUY7xEYnmiLzMzeuMvjObJ6Xbh/CNREhu/QWCoe3H GyxB0zBU/9xhP4Zx3nrcD1Iur1Hq6En7vXLiKHw+y6gb0jIadE1ST5GqdfH1JK/My3Av ihTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T5Xd8mmYM32aYWsV+JS4zJF3yib8jGf3ov52iW7dkys=; b=unB/yrxIzLw/u9P+EKCJQWRwEbrE1+Km171tg4Pr6EilwVB1mVLrCcm2y6ZSOoiZQy oPS3YbgU5XIax7SEb6hhl4E0VZfYR48wCi4w3BnWwNi3hZ1b1E0z08R+56HqosVv42x2 NQ7iLiJQQSkiNNa9TO0uTM+QWB9+C3uUGJWJ8xtY3qGvmErKCk7U2cgS4BOxMTnx13yj 05sv8FaUJxOYnAzf1NLyX6iPUFXc61vvp3eObHHlogt13yUHOFVJuFmYZPcYmkDQyC07 /GSTo40iulHnxYZB/4flE5gAhw2JHWXsJI+XgJV1HCfXgr1wK1buMgE1j6/YECnLBNlp WPxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=a247I2rc; 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 y6-20020a17090322c600b0016cca53817dsi22812006plg.341.2022.08.25.10.17.20; Thu, 25 Aug 2022 10:17:35 -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=a247I2rc; 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 S243131AbiHYQoj (ORCPT + 99 others); Thu, 25 Aug 2022 12:44:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242083AbiHYQnq (ORCPT ); Thu, 25 Aug 2022 12:43:46 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D166FBC12F for ; Thu, 25 Aug 2022 09:42:56 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id f21so20877399pjt.2 for ; Thu, 25 Aug 2022 09:42:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=T5Xd8mmYM32aYWsV+JS4zJF3yib8jGf3ov52iW7dkys=; b=a247I2rc5JAOD5ORKb3punvZ2pFvBSqM3A39uthrzLajeyXc85gOrdcNy3BgNnqo8B nUbn0XfHwV6+uojKSFxqqzA5v8Mj4NtnMzq//ATHO0+HsXT8XuREqfHrEeJaFvVAuRXI SABXuO68ZnK0GrKNBamHmmW/ybwjCsXas/hkcvr+sOts7EtnEuJSucGoxilYjU28MitS cHtoAX7xT5ZaltNlcjhiWBgM3fp0ShLjMTvh6695T22SaarIZaqTq9s9kSM5IdCcQqtO eTtx+b2QxFmXP8+m/6F+KizCCfjy/eGiZeJHzGtiBokhXtpmqJdxzwHGH8OcAf06lwzR eRvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=T5Xd8mmYM32aYWsV+JS4zJF3yib8jGf3ov52iW7dkys=; b=VcPAU1k1tMZvaszipQlxKhDMEoKnQRtNcOosA1YNXRlO8OaxxII6Fc7SBrWdoKtJah eN9hd64zDypBDmSjd/Vt3oGx5H1GepF1hZzPyCCE3SZe5hnsn4PjSZ2X1IFNgHJXlsnv AB6Ak2fi+uuZlHwMNeVatuwQF0hj1hAi8ZvYwH4ICKyDGuMPHSYjACMhXn1qLCgcFSrR zTEQfvneeZv4gAXkoPImaT3lFd+1HtM+jKnKJQDbiGZa+RRaq2W5ery18QARNLJVa3b4 K7joCNYK9+I9ZKryn2ZIfom99uBVyzT3uF3YcIj5NeDlzlu4oNgiK2B5cPalGbJyoAdP fFcA== X-Gm-Message-State: ACgBeo1CfCvLc5tTjv//9LHTLGULzs9o1BzKg2v5jNYQTUUdaQgPaM9j gjNcnnQROZgnjpxcdPA7Nwxcog== X-Received: by 2002:a17:903:234f:b0:16f:18a6:451a with SMTP id c15-20020a170903234f00b0016f18a6451amr4528142plh.82.1661445776366; Thu, 25 Aug 2022 09:42:56 -0700 (PDT) Received: from localhost.localdomain ([139.177.225.236]) by smtp.gmail.com with ESMTPSA id b18-20020a62a112000000b005362314bf80sm12779408pff.67.2022.08.25.09.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 09:42:55 -0700 (PDT) From: Chengming Zhou To: hannes@cmpxchg.org, tj@kernel.org, mkoutny@suse.com, surenb@google.com Cc: mingo@redhat.com, peterz@infradead.org, gregkh@linuxfoundation.org, corbet@lwn.net, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, songmuchun@bytedance.com, Chengming Zhou Subject: [PATCH v4 04/10] sched/psi: move private helpers to sched/stats.h Date: Fri, 26 Aug 2022 00:41:05 +0800 Message-Id: <20220825164111.29534-5-zhouchengming@bytedance.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220825164111.29534-1-zhouchengming@bytedance.com> References: <20220825164111.29534-1-zhouchengming@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=unavailable 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 This patch move psi_task_change/psi_task_switch declarations out of PSI public header, since they are only needed for implementing the PSI stats tracking in sched/stats.h psi_task_switch is obvious, psi_task_change can't be public helper since it doesn't check psi_disabled static key. And there is no any user now, so put it in sched/stats.h too. Signed-off-by: Chengming Zhou Acked-by: Johannes Weiner --- include/linux/psi.h | 4 ---- kernel/sched/stats.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/psi.h b/include/linux/psi.h index dd74411ac21d..fffd229fbf19 100644 --- a/include/linux/psi.h +++ b/include/linux/psi.h @@ -18,10 +18,6 @@ extern struct psi_group psi_system; void psi_init(void); -void psi_task_change(struct task_struct *task, int clear, int set); -void psi_task_switch(struct task_struct *prev, struct task_struct *next, - bool sleep); - void psi_memstall_enter(unsigned long *flags); void psi_memstall_leave(unsigned long *flags); diff --git a/kernel/sched/stats.h b/kernel/sched/stats.h index baa839c1ba96..c39b467ece43 100644 --- a/kernel/sched/stats.h +++ b/kernel/sched/stats.h @@ -107,6 +107,10 @@ __schedstats_from_se(struct sched_entity *se) } #ifdef CONFIG_PSI +void psi_task_change(struct task_struct *task, int clear, int set); +void psi_task_switch(struct task_struct *prev, struct task_struct *next, + bool sleep); + /* * PSI tracks state that persists across sleeps, such as iowaits and * memory stalls. As a result, it has to distinguish between sleeps, -- 2.37.2