sched: Clean up and standardize #if/#else/#endif markers in sched/stats.[ch]
- Use the standard #ifdef marker format for larger blocks,
where appropriate:
#if CONFIG_FOO
...
#else /* !CONFIG_FOO: */
...
#endif /* !CONFIG_FOO */
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20250528080924.2273858-17-mingo@kernel.org
pull/1309/head
parent
fdccd0c792
commit
91433cd6e4
|
|
@ -164,7 +164,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
|
||||||
sd->ttwu_move_balance);
|
sd->ttwu_move_balance);
|
||||||
}
|
}
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
#endif
|
#endif /* CONFIG_SMP */
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,10 +112,10 @@ void psi_task_switch(struct task_struct *prev, struct task_struct *next,
|
||||||
bool sleep);
|
bool sleep);
|
||||||
#ifdef CONFIG_IRQ_TIME_ACCOUNTING
|
#ifdef CONFIG_IRQ_TIME_ACCOUNTING
|
||||||
void psi_account_irqtime(struct rq *rq, struct task_struct *curr, struct task_struct *prev);
|
void psi_account_irqtime(struct rq *rq, struct task_struct *curr, struct task_struct *prev);
|
||||||
#else
|
#else /* !CONFIG_IRQ_TIME_ACCOUNTING: */
|
||||||
static inline void psi_account_irqtime(struct rq *rq, struct task_struct *curr,
|
static inline void psi_account_irqtime(struct rq *rq, struct task_struct *curr,
|
||||||
struct task_struct *prev) {}
|
struct task_struct *prev) {}
|
||||||
#endif /*CONFIG_IRQ_TIME_ACCOUNTING */
|
#endif /* !CONFIG_IRQ_TIME_ACCOUNTING */
|
||||||
/*
|
/*
|
||||||
* PSI tracks state that persists across sleeps, such as iowaits and
|
* PSI tracks state that persists across sleeps, such as iowaits and
|
||||||
* memory stalls. As a result, it has to distinguish between sleeps,
|
* memory stalls. As a result, it has to distinguish between sleeps,
|
||||||
|
|
@ -220,7 +220,7 @@ static inline void psi_sched_switch(struct task_struct *prev,
|
||||||
psi_task_switch(prev, next, sleep);
|
psi_task_switch(prev, next, sleep);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* CONFIG_PSI */
|
#else /* !CONFIG_PSI: */
|
||||||
static inline void psi_enqueue(struct task_struct *p, bool migrate) {}
|
static inline void psi_enqueue(struct task_struct *p, bool migrate) {}
|
||||||
static inline void psi_dequeue(struct task_struct *p, bool migrate) {}
|
static inline void psi_dequeue(struct task_struct *p, bool migrate) {}
|
||||||
static inline void psi_ttwu_dequeue(struct task_struct *p) {}
|
static inline void psi_ttwu_dequeue(struct task_struct *p) {}
|
||||||
|
|
@ -229,7 +229,7 @@ static inline void psi_sched_switch(struct task_struct *prev,
|
||||||
bool sleep) {}
|
bool sleep) {}
|
||||||
static inline void psi_account_irqtime(struct rq *rq, struct task_struct *curr,
|
static inline void psi_account_irqtime(struct rq *rq, struct task_struct *curr,
|
||||||
struct task_struct *prev) {}
|
struct task_struct *prev) {}
|
||||||
#endif /* CONFIG_PSI */
|
#endif /* !CONFIG_PSI */
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_INFO
|
#ifdef CONFIG_SCHED_INFO
|
||||||
/*
|
/*
|
||||||
|
|
@ -334,6 +334,6 @@ sched_info_switch(struct rq *rq, struct task_struct *prev, struct task_struct *n
|
||||||
# define sched_info_enqueue(rq, t) do { } while (0)
|
# define sched_info_enqueue(rq, t) do { } while (0)
|
||||||
# define sched_info_dequeue(rq, t) do { } while (0)
|
# define sched_info_dequeue(rq, t) do { } while (0)
|
||||||
# define sched_info_switch(rq, t, next) do { } while (0)
|
# define sched_info_switch(rq, t, next) do { } while (0)
|
||||||
#endif /* CONFIG_SCHED_INFO */
|
#endif /* !CONFIG_SCHED_INFO */
|
||||||
|
|
||||||
#endif /* _KERNEL_STATS_H */
|
#endif /* _KERNEL_STATS_H */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue