android_kernel_samsung_msm8976/kernel/sched
Thomas Gleixner ecaf19a768 sched: Sanitize irq accounting madness
commit 2d513868e2a33e1d5315490ef4c861ee65babd65 upstream.

Russell reported, that irqtime_account_idle_ticks() takes ages due to:

       for (i = 0; i < ticks; i++)
               irqtime_account_process_tick(current, 0, rq);

It's sad, that this code was written way _AFTER_ the NOHZ idle
functionality was available. I charge myself guitly for not paying
attention when that crap got merged with commit abb74cefa ("sched:
Export ns irqtimes through /proc/stat")

So instead of looping nr_ticks times just apply the whole thing at
once.

As a side note: The whole cputime_t vs. u64 business in that context
wants to be cleaned up as well. There is no point in having all these
back and forth conversions. Lets standardise on u64 nsec for all
kernel internal accounting and be done with it. Everything else does
not make sense at all for fine grained accounting. Frederic, can you
please take care of that?

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Venkatesh Pallipadi <venki@google.com>
Cc: Shaun Ruffell <sruffell@digium.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1405022307000.6261@ionos.tec.linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-11 12:03:21 -07:00
..
auto_group.c sched/autogroup: Fix race with task_groups list 2014-03-31 09:58:14 -07:00
auto_group.h
clock.c
core.c sched: Fix race on toggling cfs_bandwidth_used 2014-01-15 15:28:54 -08:00
cpuacct.c
cpuacct.h
cpupri.c sched: Use CPUPRI_NR_PRIORITIES instead of MAX_RT_PRIO in cpupri check 2014-06-11 12:03:21 -07:00
cpupri.h
cputime.c sched: Sanitize irq accounting madness 2014-06-11 12:03:21 -07:00
debug.c sched: Avoid throttle_cfs_rq() racing with period_timer stopping 2013-12-20 07:45:11 -08:00
fair.c sched: Fix double normalization of vruntime 2014-03-23 21:38:09 -07:00
features.h
idle_task.c
Makefile
rt.c sched/rt: Fix rq's cpupri leak while enqueue/dequeue child RT entities 2014-01-09 12:24:21 -08:00
sched.h sched: Fix race on toggling cfs_bandwidth_used 2014-01-15 15:28:54 -08:00
stats.c
stats.h
stop_task.c