All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [uml-devel] [UM] Long loop in __getnsdayoftime() after resume from ram
@ 2014-10-20  9:51 ` Thomas Meyer
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Meyer @ 2014-10-20  9:51 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: user-mode-linux-devel, Linux Kernel Mailing List

Am 20.10.2014 10:27 schrieb Richard Weinberger <richard.weinberger@gmail.com>:
>
> On Sun, Oct 19, 2014 at 2:39 PM, Thomas Meyer <thomas@m3y3r.de> wrote: 
> > 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? 
>
> Hmm, does this always happen?

Yes, my single core system seems to trigger this every time after resume from ram.

> At least on my notebook it did not happen. I've started an UML yesterday 
> suspended it and after more than 12h it worked fine today. 
>
> BTW: Do you see the issue also then freezing UML using the freezer cgroup?

I'm not sure what do you mean by this. Do I need to enable some special configs for this in the host or uml kernel?

> Would be easier to debug. :) 
>
> -- 
> Thanks, 
> //richard 

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [uml-devel] [UM] Long loop in __getnsdayoftime() after resume from ram
@ 2014-10-19 12:39 Thomas Meyer
  2014-10-20  8:27 ` Richard Weinberger
  0 siblings, 1 reply; 16+ 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.


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


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

end of thread, other threads:[~2015-04-30 16:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-20  9:51 [uml-devel] [UM] Long loop in __getnsdayoftime() after resume from ram Thomas Meyer
2014-10-20  9:51 ` Thomas Meyer
2014-10-20  9:56 ` Richard Weinberger
2014-10-20 19:19   ` Thomas Meyer
2015-04-24 19:58   ` Thomas Meyer
2015-04-26 18:32     ` Richard Weinberger
2015-04-26 20:20       ` Richard Weinberger
2015-04-26 20:57       ` Thomas Meyer
2015-04-26 20:57         ` Thomas Meyer
2015-04-26 21:00         ` Richard Weinberger
2015-04-27  5:47           ` Anton Ivanov
2015-04-27  7:23             ` Richard Weinberger
2015-04-27  8:20               ` Anton Ivanov
2015-04-30 16:40               ` Thomas Meyer
  -- strict thread matches above, loose matches on Subject: below --
2014-10-19 12:39 Thomas Meyer
2014-10-20  8:27 ` Richard Weinberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.