proc: read kernel cpu stat pointer once
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 5 Mar 2019 23:50:32 +0000 (15:50 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 Mar 2019 05:07:21 +0000 (21:07 -0800)
commit5713f35c0575a1137b705e13d10f8ee58f2ec7e8
tree9d462a814259b9defab8310b8a4ac0f1a5d54270
parent867aaccf1f2c35eff4706ea69299f731f2a1953e
proc: read kernel cpu stat pointer once

Help gcc generate better code:

$ ./scripts/bloat-o-meter ../vmlinux-000 ../vmlinux-001
add/remove: 2/2 grow/shrink: 0/1 up/down: 92/-142 (-50)
Function                                     old     new   delta
get_iowait_time.isra                           -      46     +46
get_idle_time.isra                             -      46     +46
show_stat                                   1489    1477     -12
get_iowait_time                               65       -     -65
get_idle_time                                 65       -     -65

Link: http://lkml.kernel.org/r/20190114195907.GA9680@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/stat.c