diff options
author | Chengming Zhou <zhouchengming@bytedance.com> | 2022-08-25 18:41:05 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-09-09 11:08:31 +0200 |
commit | d79ddb069c5257a924456eb99b53fc1ea715c0a3 (patch) | |
tree | e65c511751a7ca2a8baf8eb611ed0168cd411e0d /kernel/sched/stats.h | |
parent | sched/psi: Save percpu memory when !psi_cgroups_enabled (diff) | |
download | linux-d79ddb069c5257a924456eb99b53fc1ea715c0a3.tar.xz linux-d79ddb069c5257a924456eb99b53fc1ea715c0a3.zip |
sched/psi: Move private helpers to sched/stats.h
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 <zhouchengming@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lore.kernel.org/r/20220825164111.29534-5-zhouchengming@bytedance.com
Diffstat (limited to 'kernel/sched/stats.h')
-rw-r--r-- | kernel/sched/stats.h | 4 |
1 files changed, 4 insertions, 0 deletions
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, |