Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp323953rwe; Wed, 24 Aug 2022 01:22:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR5sSlmK363oBxK2q6/0HcL2e3xGh1kuP9DUuyj4iWHAORiP6OOEyRYIVfXlTln0HEyVaUk3 X-Received: by 2002:a05:6402:4252:b0:446:ef32:b3fd with SMTP id g18-20020a056402425200b00446ef32b3fdmr6836811edb.374.1661329367483; Wed, 24 Aug 2022 01:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661329367; cv=none; d=google.com; s=arc-20160816; b=NtvKXR4S+TODqTea72TRAXbXdmVBnZ+nZCqGKOck2YSWfRvRodPfOERI3pMYacBwfw xAVUzDwf37eFeqV+Viu+ToLiFiw65evKpbCO9pRBh77lMue2f/UKx6EqNNor8FSPhzNm 0dFGRlydrOxDnBQQOgImZbbIjE3cVRK8i9PtXHgrv7q45AnC+mG/hY1nOmOk61vB17NP Nl5/pWur7+NjsH1JuAGWnfexNfMbbbB/RXhMwZnHF90t0EuyyXe5w5DKRMxDAG/vQ4tQ qQC9n2bwCnJyFf8YPir9fVdqZgxbcjcAWa9c7VpLjKru2AKyW0gtx3mCrJC8eOg/2wgz MuCA== 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=GBZYVm6kUZZL/G2m3onJk5maReDYGzlx6HpnRaUyNKDhZGX5MQKw174/9k+sBf0Hei u0793jIYU/qO3DjYCvY0iU1yAdX1QkCwoqX+RxdqDC4Oux74epyqcLB4VjmWIMBkbt0n YqP4IJZCfbxpzgo81KkdAg8sPg/rfiskQBVIYoVPhOqEZxfZollgxuyltGITx7mq/VDk 7kVkGj9CHahCEixdrCKq3DfDVDE2sCs3XUo64DjT3l/tUnPdzSkWmrs8+0zI2YlHeds1 fgkdAnUHxWSwM2AnFZsfEUE2jjB0x1VNovExUXrEFQKdXl3pvgAGhq/iBeqwyJUiPJsA E6fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=2hbOVKhO; 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 ga26-20020a1709070c1a00b0073123a3bea6si1582488ejc.769.2022.08.24.01.22.21; Wed, 24 Aug 2022 01:22:47 -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=2hbOVKhO; 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 S235656AbiHXIUM (ORCPT + 99 others); Wed, 24 Aug 2022 04:20:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235660AbiHXIUE (ORCPT ); Wed, 24 Aug 2022 04:20:04 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2B34857C2 for ; Wed, 24 Aug 2022 01:20:03 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id u22so15015334plq.12 for ; Wed, 24 Aug 2022 01:20:03 -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=2hbOVKhOIJMdq+ESAqgtn9qO5FOZb7JuoMEFLh7q/VunkkOu9QAT5ULHRWLNGQHUmN f+BAdie4GiPCPkFWX4K1h+kjjefd+BKv3QZwl+MX/Wi+1tUdoLPaG1DFS88O0FQD8OIe MuLXlFlHpQY7LCq6GjLVtMo1aGQRwAoCaEiL9D1wC1vXIIQ6YXzfgWEfJeBvS+brm3jC o4YhJAJGyZ5PspBdTHCfEKsF2rRbqlBg6h4ajiQztHfDToeo84tMAeHwNtV8roDKp62a RDIJ5oLfbDn9L+m38KS0qIw2WwsB5HKK2qwtDhQAPv3bCGmDIJym1uNeXaJYeGGm1F/9 J9og== 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=I/j5GOfzYemO9DAwdiK4ZSQkLdRFe0k02F13UbRfTo2RRaPtH8zEIWAvyuMZvXRomh /DonBM9p0KaOR+C/XfkieKO9XXG9EhZpsd22fIbkhoqLfRV+X7B1kAHzsiGdq6A/BKyt CmHvr+f8+TeWKSLUD1TT+83oqtblSg2OtCrcIKmKg2+lrRgiKWjvQnn64/kScyF/GLNd P0ThP8bSTPIHH3cIPt0FLKddRn5PgYPykFFEvYSfVLSPSqkShT2f/9MdE3JF4RlvN6k7 nck0ohR9gmAgZ0WNdtiOC57WKNDh1d0Swyagd0JovXcHT6J0wE4PQo10uNGw5+WGOcwc hs+A== X-Gm-Message-State: ACgBeo3NRpsu3oYGe/LP0D9vCI0G1VZhdw0x8OSeCzjcZJ7tZET54TX7 6rJP2fGYkfyTtKsT3oqIsMZcR0xBitQDbQ== X-Received: by 2002:a17:90a:c78f:b0:1fa:e505:18e6 with SMTP id gn15-20020a17090ac78f00b001fae50518e6mr7359010pjb.23.1661329203483; Wed, 24 Aug 2022 01:20:03 -0700 (PDT) Received: from C02CV1DAMD6P.bytedance.net ([139.177.225.244]) by smtp.gmail.com with ESMTPSA id q31-20020a635c1f000000b00421841943dfsm10486587pgb.12.2022.08.24.01.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 01:20:03 -0700 (PDT) From: Chengming Zhou To: tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com, surenb@google.com Cc: gregkh@linuxfoundation.org, corbet@lwn.net, mingo@redhat.com, peterz@infradead.org, songmuchun@bytedance.com, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Chengming Zhou Subject: [PATCH v3 04/10] sched/psi: move private helpers to sched/stats.h Date: Wed, 24 Aug 2022 16:18:23 +0800 Message-Id: <20220824081829.33748-5-zhouchengming@bytedance.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220824081829.33748-1-zhouchengming@bytedance.com> References: <20220824081829.33748-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=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 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