Message ID | 20210329161547.1159738-2-frank.heimes@canonical.com |
---|---|
State | New |
Headers | show |
Series | s390/vtime: fix increased steal time accounting (LP: 1921498) | expand |
On 29/03/2021 18:15, frank.heimes@canonical.com wrote: > From: Gerald Schaefer <gerald.schaefer@linux.ibm.com> > > BugLink: https://bugs.launchpad.net/bugs/1921498 > > Commit 152e9b8676c6e ("s390/vtime: steal time exponential moving average") > inadvertently changed the input value for account_steal_time() from > "cputime_to_nsecs(steal)" to just "steal", resulting in broken increased > steal time accounting. > > Fix this by changing it back to "cputime_to_nsecs(steal)". > > Fixes: 152e9b8676c6e ("s390/vtime: steal time exponential moving average") > Cc: <stable@vger.kernel.org> # 5.1 > Reported-by: Sabine Forkel <sabine.forkel@de.ibm.com> > Reviewed-by: Heiko Carstens <hca@linux.ibm.com> > Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> > Signed-off-by: Heiko Carstens <hca@linux.ibm.com> > (cherry picked from commit d54cb7d54877d529bc1e0e1f47a3dd082f73add3) > Signed-off-by: Frank Heimes <frank.heimes@canonical.com> > --- > arch/s390/kernel/vtime.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Best regards, Krzysztof
Acked-by: Tim Gardner <tim.gardner@canonical.com> On 3/29/21 10:15 AM, frank.heimes@canonical.com wrote: > From: Gerald Schaefer <gerald.schaefer@linux.ibm.com> > > BugLink: https://bugs.launchpad.net/bugs/1921498 > > Commit 152e9b8676c6e ("s390/vtime: steal time exponential moving average") > inadvertently changed the input value for account_steal_time() from > "cputime_to_nsecs(steal)" to just "steal", resulting in broken increased > steal time accounting. > > Fix this by changing it back to "cputime_to_nsecs(steal)". > > Fixes: 152e9b8676c6e ("s390/vtime: steal time exponential moving average") > Cc: <stable@vger.kernel.org> # 5.1 > Reported-by: Sabine Forkel <sabine.forkel@de.ibm.com> > Reviewed-by: Heiko Carstens <hca@linux.ibm.com> > Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> > Signed-off-by: Heiko Carstens <hca@linux.ibm.com> > (cherry picked from commit d54cb7d54877d529bc1e0e1f47a3dd082f73add3) > Signed-off-by: Frank Heimes <frank.heimes@canonical.com> > --- > arch/s390/kernel/vtime.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c > index 3e72f955bff7..6e60cc2443b2 100644 > --- a/arch/s390/kernel/vtime.c > +++ b/arch/s390/kernel/vtime.c > @@ -217,7 +217,7 @@ void vtime_flush(struct task_struct *tsk) > avg_steal = S390_lowcore.avg_steal_timer / 2; > if ((s64) steal > 0) { > S390_lowcore.steal_timer = 0; > - account_steal_time(steal); > + account_steal_time(cputime_to_nsecs(steal)); > avg_steal += steal; > } > S390_lowcore.avg_steal_timer = avg_steal; >
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 3e72f955bff7..6e60cc2443b2 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c @@ -217,7 +217,7 @@ void vtime_flush(struct task_struct *tsk) avg_steal = S390_lowcore.avg_steal_timer / 2; if ((s64) steal > 0) { S390_lowcore.steal_timer = 0; - account_steal_time(steal); + account_steal_time(cputime_to_nsecs(steal)); avg_steal += steal; } S390_lowcore.avg_steal_timer = avg_steal;