Skip to contentSkip to conversation

sched: nohz: stop passing around unused "ticks" parameter.

PATCH Applied Paul Gortmaker 2 participants 2 messages Jul 1, 2020 – Jul 22, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: nohz: stop passing around unused "ticks" parameter.

The "ticks" parameter was added in commit 0f004f5a696a ("sched: Cure more NO_HZ load average woes") since calc_global_nohz() was called and needed the "ticks" argument.

But in commit c308b56b5398 ("sched: Fix nohz load accounting -- again!") it became unused as the function calc_global_nohz() dropped using "ticks".

Fixes c308b56b5398 ("sched: Fix nohz load accounting -- again!")
Cc Peter Zijlstra <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 include/linux/sched/loadavg.h | 2 +-
 kernel/sched/loadavg.c        | 2 +-
 kernel/time/timekeeping.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
include/linux/sched/loadavg.h +1 -1
index 4859bea47a7b..83ec54b65e79 100644
@@ -43,6 +43,6 @@ extern unsigned long calc_load_n(unsigned long load, unsigned long exp,
 #define LOAD_INT(x) ((x) >> FSHIFT)
 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
 
-extern void calc_global_load(unsigned long ticks);
+extern void calc_global_load(void);
 
 #endif /* _LINUX_SCHED_LOADAVG_H */
kernel/sched/loadavg.c +1 -1
index de22da666ac7..d2a655643a02 100644
@@ -347,7 +347,7 @@ static inline void calc_global_nohz(void) { }
  *
  * Called from the global timer code.
  */
-void calc_global_load(unsigned long ticks)
+void calc_global_load(void)
 {
 	unsigned long sample_window;
 	long active, delta;
kernel/time/timekeeping.c +1 -1
index d20d489841c8..63a632f9896c 100644
@@ -2193,7 +2193,7 @@ void ktime_get_coarse_ts64(struct timespec64 *ts)
 void do_timer(unsigned long ticks)
 {
 	jiffies_64 += ticks;
-	calc_global_load(ticks);
+	calc_global_load();
 }
 
 /**
Signature · 1 line
3.9.1
merge bot Applied
#1 lore raw
The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     46132e3ac58cb2ee48051ed80bffc0070ad59b2e
Gitweb:        https://git.kernel.org/tip/46132e3ac58cb2ee48051ed80bffc0070ad59b2e
Author:        Paul Gortmaker <[email protected]>
AuthorDate:    Wed, 01 Jul 2020 14:34:18 -04:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Wed, 22 Jul 2020 10:22:04 +02:00

sched: nohz: stop passing around unused "ticks" parameter.

The "ticks" parameter was added in commit 0f004f5a696a ("sched: Cure more NO_HZ load average woes") since calc_global_nohz() was called and needed the "ticks" argument.

But in commit c308b56b5398 ("sched: Fix nohz load accounting -- again!") it became unused as the function calc_global_nohz() dropped using "ticks".

Fixes c308b56b5398 ("sched: Fix nohz load accounting -- again!")
---
 include/linux/sched/loadavg.h | 2 +-
 kernel/sched/loadavg.c        | 2 +-
 kernel/time/timekeeping.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
include/linux/sched/loadavg.h +1 -1
index 4859bea..83ec54b 100644
@@ -43,6 +43,6 @@ extern unsigned long calc_load_n(unsigned long load, unsigned long exp,
 #define LOAD_INT(x) ((x) >> FSHIFT)
 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
 
-extern void calc_global_load(unsigned long ticks);
+extern void calc_global_load(void);
 
 #endif /* _LINUX_SCHED_LOADAVG_H */
kernel/sched/loadavg.c +1 -1
index de22da6..d2a6556 100644
@@ -347,7 +347,7 @@ static inline void calc_global_nohz(void) { }
  *
  * Called from the global timer code.
  */
-void calc_global_load(unsigned long ticks)
+void calc_global_load(void)
 {
 	unsigned long sample_window;
 	long active, delta;
kernel/time/timekeeping.c +1 -1
index d20d489..63a632f 100644
@@ -2193,7 +2193,7 @@ EXPORT_SYMBOL(ktime_get_coarse_ts64);
 void do_timer(unsigned long ticks)
 {
 	jiffies_64 += ticks;
-	calc_global_load(ticks);
+	calc_global_load();
 }
 
 /**