aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <[email protected]>2017-04-25 14:10:48 +0000
committerIngo Molnar <[email protected]>2017-04-27 07:08:26 +0000
commit25e2d8c1b9e327ed260edd13169cc22bc7a78bc6 (patch)
tree5b3188a9ed2b656c729820daab75993bb4d73363 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
parentMerge tag 'arc-4.11-final' of git://git.kernel.org/pub/scm/linux/kernel/git/v... (diff)
downloadkernel-25e2d8c1b9e327ed260edd13169cc22bc7a78bc6.tar.gz
kernel-25e2d8c1b9e327ed260edd13169cc22bc7a78bc6.zip
sched/cputime: Fix ksoftirqd cputime accounting regression
irq_time_read() returns the irqtime minus the ksoftirqd time. This is necessary because irq_time_read() is used to substract the IRQ time from the sum_exec_runtime of a task. If we were to include the softirq time of ksoftirqd, this task would substract its own CPU time everytime it updates ksoftirqd->sum_exec_runtime which would therefore never progress. But this behaviour got broken by: a499a5a14db ("sched/cputime: Increment kcpustat directly on irqtime account") ... which now includes ksoftirqd softirq time in the time returned by irq_time_read(). This has resulted in wrong ksoftirqd cputime reported to userspace through /proc/stat and thus "top" not showing ksoftirqd when it should after intense networking load. ksoftirqd->stime happens to be correct but it gets scaled down by sum_exec_runtime through task_cputime_adjusted(). To fix this, just account the strict IRQ time in a separate counter and use it to report the IRQ time. Reported-and-tested-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Reviewed-by: Rik van Riel <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stanislaw Gruszka <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Wanpeng Li <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions