8000 sched/core: Enable increased load resolution on 64-bit kernels · bsd-unix/linux@2159197 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 2159197

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
sched/core: Enable increased load resolution on 64-bit kernels
Mike ran into the low load resolution limitation on his big machine. So reenable these bits; nobody could ever reproduce/analyze the reported power usage claim and Google has been running with this for years as well. Reported-by: Mike Galbraith <umgwanakikbuti@gmail.com> Tested-by: Mike Galbraith <umgwanakikbuti@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent e7904a2 commit 2159197

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

kernel/sched/sched.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ static inline void cpu_load_update_active(struct rq *this_rq) { }
4949
* and does not change the user-interface for setting shares/weights.
5050
*
5151
* We increase resolution only if we have enough bits to allow this increased
52-
* resolution (i.e. BITS_PER_LONG > 32). The costs for increasing resolution
53-
* when BITS_PER_LONG <= 32 are pretty high and the returns do not justify the
54-
* increased costs.
52+
* resolution (i.e. 64bit). The costs for increasing resolution when 32bit are
53+
* pretty high and the returns do not justify the increased costs.
54+
*
55+
* Really only required when CONFIG_FAIR_GROUP_SCHED is also set, but to
56+
* increase coverage and consistency always enable it on 64bit platforms.
5557
*/
56-
#if 0 /* BITS_PER_LONG > 32 -- currently broken: it increases power usage under light load */
58+
#ifdef CONFIG_64BIT
5759
# define SCHED_LOAD_RESOLUTION 10
5860
# define scale_load(w) ((w) << SCHED_LOAD_RESOLUTION)
5961
# define scale_load_down(w) ((w) >> SCHED_LOAD_RESOLUTION)

0 commit comments

Comments
 (0)
0