public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [UM] Long loop in __getnsdayoftime() after resume from ram
@ 2014-10-19 12:39 Thomas Meyer
  2014-10-20  8:27 ` [uml-devel] " Richard Weinberger
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Meyer @ 2014-10-19 12:39 UTC (permalink / raw)
  To: user-mode-linux-devel, Linux Kernel Mailing List

Hello,

in UML kernel I get a long cpu using loop in __getnstimeofday()
(kernel/time/timekeeping.c:315) in the call of timespec_add_ns(),
when I left the host kernel suspended to ram for a few hours and resume
again.
this is because it seems like the tk->xtime_sec wasn't updated yet, but
the nsecs were. nsecs can be as high as 8111000111000111000l

the function timespec_add_ns() (include/linux/time.h:266) will call
__iter_div_u64_rem() which has an optimized loop for the case
that the dividend is not much bigger as the divisior.
but this isn't the case for resume from ram on the host kernel.

any ideas how to fix this? is it possible to intercept the resume from
ram and update the timekeeper->xtime_sec somehow?
or can the um arch somehow overwrite timespec_add_ns() to always use
div_u64_rem() instead?

with kind regards

PS: repost on these lists, because nobody did respond to my original
email.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-20  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-19 12:39 [UM] Long loop in __getnsdayoftime() after resume from ram Thomas Meyer
2014-10-20  8:27 ` [uml-devel] " Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox