]> git.baikalelectronics.ru Git - kernel.git/commit
s390/cputime: fix guest/irq/softirq times after CPU hotplug
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 4 Oct 2017 12:46:17 +0000 (14:46 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 16 Oct 2017 06:19:01 +0000 (08:19 +0200)
commit6280449f53051889eb049138d849e65e01297c45
tree6266a88bfe567fd2b64ff6991882887feac93c73
parent5487b3a42601df0881c182b2c0c0b0ffe261c694
s390/cputime: fix guest/irq/softirq times after CPU hotplug

On CPU hotplug some cpu stats contain bogus values:

$ cat /proc/stat
cpu 0 0 49 1280 0 0 0 3 0 0
cpu0 0 0 49 618 0 0 0 3 0 0
cpu1 0 0 0 662 0 0 0 0 0 0
[...]
$ echo 0 > /sys/devices/system/cpu/cpu1/online
$ echo 1 > /sys/devices/system/cpu/cpu1/online
$ cat /proc/stat
cpu 0 0 49 3200 0 450359962737 450359962737 3 0 0
cpu0 0 0 49 1956 0 0 0 3 0 0
cpu1 0 0 0 1244 0 450359962737 450359962737 0 0 0
[...]

pcpu_attach_task() needs the same assignments as vtime_task_switch.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Fixes: d3a2c1aa2026 ("sched/cputime, s390: Implement delayed accounting of system time")
Cc: stable@vger.kernel.org # 4.11+
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/smp.c