Skip to content

Commit d79ddb0

Browse files
Chengming ZhouPeter Zijlstra
authored andcommitted
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 <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Johannes Weiner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e2ad8ab commit d79ddb0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/linux/psi.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ extern struct psi_group psi_system;
1818

1919
void psi_init(void);
2020

21-
void psi_task_change(struct task_struct *task, int clear, int set);
22-
void psi_task_switch(struct task_struct *prev, struct task_struct *next,
23-
bool sleep);
24-
2521
void psi_memstall_enter(unsigned long *flags);
2622
void psi_memstall_leave(unsigned long *flags);
2723

kernel/sched/stats.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ __schedstats_from_se(struct sched_entity *se)
107107
}
108108

109109
#ifdef CONFIG_PSI
110+
void psi_task_change(struct task_struct *task, int clear, int set);
111+
void psi_task_switch(struct task_struct *prev, struct task_struct *next,
112+
bool sleep);
113+
110114
/*
111115
* PSI tracks state that persists across sleeps, such as iowaits and
112116
* memory stalls. As a result, it has to distinguish between sleeps,

0 commit comments

Comments
 (0)