[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1903020030320.1638@nanos.tec.linutronix.de>
Date: Sat, 2 Mar 2019 00:43:47 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Dongli Zhang <dongli.zhang@...cle.com>
cc: xen-devel@...ts.xenproject.org, stable@...r.kernel.org,
linux-kernel@...r.kernel.org, boris.ostrovsky@...cle.com,
sstabellini@...nel.org, jgross@...e.com, joe.jin@...cle.com,
Herbert Van Den Bergh <herbert.van.den.bergh@...cle.com>,
sboyd@...nel.org, john.stultz@...aro.org
Subject: Re: [BUG linux-4.9.x] xen hotplug cpu leads to 100% steal usage
On Thu, 28 Feb 2019, Dongli Zhang wrote:
>
> The root cause is that the return type of jiffies_to_usecs() is 'unsigned int',
> but not 'unsigned long'. As a result, the leading 32 bits are discarded.
Errm. No. The root cause is that jiffies_to_usecs() is used for that in the
first place. The function has been that way forever and all usage sites
(except a broken dev_debug print in infiniband) feed delta values. Yes, it
could have documentation....
> jiffies_to_usecs() is indirectly triggered by cputime_to_nsecs() at line 264.
> If guest is already up for long time, the initial steal time for new vcpu might
> be large and the leading 32 bits of jiffies_to_usecs() would be discarded.
> So far, I have two solutions:
>
> 1. Change the return type from 'unsigned int' to 'unsigned long' as in above
> link and I am afraid it would bring side effect. The return type in latest
> mainline kernel is still 'unsigned int'.
Changing it to unsigned long would just solve the issue for 64bit.
Thanks,
tglx
Powered by blists - more mailing lists