It's great that there was a clear-cut explanation for our symptoms. Thanks for 
sharing the information.

Really interesting aritmetics..

It is also interesting to know that piece of information about hw architecture 
differences, about
clock registers. It would have been disappointing if zArch clock register had 
been only twice as
good as Intel's, but it turns out it is around 250 times better! :) It really 
is a privilege to be
able to work with zArch machines.

When the sw fix is available, even I am willing to shut the birds down just to 
apply a patch - not
for security but for stability...
If you can optimize the code even so that the next overflow happens only after 
143 years, I have to
send a note to my becoming grand-grand-children so that they will remember to 
take zlnx011 down in
_controlled_ way just before the crash would hit...

Juha

On 14.01.2013 14:11, Heiko Carstens wrote:
On Fri, Jan 11, 2013 at 11:24:41PM +0200, Juha Vuori wrote:
Hello,

Yesterday, it was 417 days since our currently running z/VM was IPLed. A set of 
four SLES 11.1
guests had been alive as long as VM.

[...]

I opened a SR with Novell about zlnx011, and the conclusion was the TID
http://www.novell.com/support/kb/doc.php?id=7009834
... well, not exactly, but "s390x version" of it. So, I recycled zlnx011, and 
plan to upgrade its
kernel soon.

Thanks for bringing this to the list! The mentioned bug fix in the Novell
bugzilla is

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=4cecf6d401a01d054afc1e5f605bcbfe553cb9b9

That patch is for x86 only and won't fix your problem. However we do have a
similar bug in the s390 kernel code. The only difference is that it will
indeed trigger after 417 days instead of 208 days.

The reason is that we calculate with differences of the TOD clock register.
The TOD clock wraps after appr. 143 years. So far no problem...

However when converting a difference to nanoseconds we must divide the value
by 4.096. Without floating point arithmetics in the kernel we do that by
multiplying with 125 and afterwards dividing by 512... and there you can
see when the overflow happens:

143 years / 125 = 1.114 years. And 365 days * 1.114 = 417.56 days.

So, that's when we hit the overflow.

We are working on a fix!

Thanks again for reporting!

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to