sched/fair: Explicitly generate __update_load_avg() instances
authorPeter Zijlstra <peterz@infradead.org>
Tue, 28 Mar 2017 09:08:20 +0000 (11:08 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 30 Mar 2017 07:43:40 +0000 (09:43 +0200)
commit0ccb977f4c80b921a8bf6a2c4b8ea0c1fed6553c
tree14f5c8b236cc952c667b1608931913820c768e7e
parent05b40e057734811ce452344fb3690d09965a7b6a
sched/fair: Explicitly generate __update_load_avg() instances

The __update_load_avg() function is an __always_inline because its
used with constant propagation to generate different variants of the
code without having to duplicate it (which would be prone to bugs).

Explicitly instantiate the 3 variants.

Note that most of this is called from rather hot paths, so reducing
branches is good.

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>
kernel/sched/fair.c