[PATCH] sched/cputime: remove irqtime_account_idle_ticks
From: Alex Shi
Date: Thu Jan 09 2020 - 07:32:55 EST
irqtime_account_idle_ticks and irqtime_account_process_tick use in same
condition. We don't bother to name and use a irqtime_account_idle_ticks
for only one calling. Remove the function to simply code and reduce a
bit object size of kernel.
And further more, we could replace account_idle_ticks by
irqtime_account_process_tick too. But feed and check 'current' looks weird.
So this is ok.
Signed-off-by: Alex Shi <alex.shi@xxxxxxxxxxxxxxxxx>
Cc: Frederic Weisbecker <frederic@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
kernel/sched/cputime.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index cff3e656566d..17640d145e44 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -390,12 +390,7 @@ static void irqtime_account_process_tick(struct task_struct *p, int user_tick,
}
}
-static void irqtime_account_idle_ticks(int ticks)
-{
- irqtime_account_process_tick(current, 0, ticks);
-}
#else /* CONFIG_IRQ_TIME_ACCOUNTING */
-static inline void irqtime_account_idle_ticks(int ticks) { }
static inline void irqtime_account_process_tick(struct task_struct *p, int user_tick,
int nr_ticks) { }
#endif /* CONFIG_IRQ_TIME_ACCOUNTING */
@@ -505,7 +500,7 @@ void account_idle_ticks(unsigned long ticks)
u64 cputime, steal;
if (sched_clock_irqtime) {
- irqtime_account_idle_ticks(ticks);
+ irqtime_account_process_tick(current, 0, ticks);
return;
}
--
1.8.3.1