Re: TSC not updating after resume: Bug or Feature?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Thomas Gleixner
Date: Sunday, December 21, 2008 - 9:26 am

On Thu, 18 Dec 2008, Rafael J. Wysocki wrote:


Thats rather simple:

suspend() saves the current time of the persistent clock (if
available), forwards the timekeeping variables so they can be reused
on resume, disables timekeeping activities and shuts down the clock
events layer.
 
resume() estimates the suspend time via persistent clock (if
available) and update xtime with the sleep length. After that it
reactivates timekeeping and resumes clock events and high resolution
timers.

So the sole purpose is:
   - dis/enable timekeeping and clock event devices.
   - keep track of the suspend time (if a persistent clock is available)

We reactivate clock event devices and hrtimers from timekeeping_resume
because clock events depend on functional timekeeping.


Care to explain ?


Hmm. Depending on the hibernation sleep time we can end up with a
pretty long delta between the pre suspend and the post resume call to
__update_sched_clock().

I have the feeling that sched_clock looks into stale values after
resume and the first call to __update_sched_clock() trips over the
stale scd->clock value. Shaggy's patch brings scd->clock into the mix
and that might cause the whole machinery to blow up on resume.

Also we need to investigate whether sched_clock is referencing gtod
values _before_ timekeeping is resume.

Thanks,

	tglx

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
TSC not updating after resume: Bug or Feature?, Deepak Saxena, (Wed Dec 17, 10:27 am)
Re: TSC not updating after resume: Bug or Feature?, Steven Rostedt, (Wed Dec 17, 10:50 am)
Re: TSC not updating after resume: Bug or Feature?, Peter Zijlstra, (Thu Dec 18, 2:24 am)
Re: TSC not updating after resume: Bug or Feature?, Ingo Molnar, (Thu Dec 18, 5:39 am)
Re: TSC not updating after resume: Bug or Feature?, Rafael J. Wysocki, (Thu Dec 18, 3:19 pm)
Re: TSC not updating after resume: Bug or Feature?, Dave Kleikamp, (Thu Dec 18, 3:25 pm)
Re: TSC not updating after resume: Bug or Feature?, Rafael J. Wysocki, (Thu Dec 18, 4:39 pm)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Sun Dec 21, 9:26 am)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Sun Dec 21, 12:43 pm)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Sun Dec 21, 1:54 pm)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Sun Dec 21, 2:19 pm)
Re: TSC not updating after resume: Bug or Feature?, Fabio Comolli, (Sun Dec 21, 3:43 pm)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Mon Dec 22, 7:48 am)
Re: TSC not updating after resume: Bug or Feature?, Ingo Molnar, (Mon Dec 22, 8:00 am)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Mon Dec 22, 11:47 am)
Re: TSC not updating after resume: Bug or Feature?, Fabio Comolli, (Mon Dec 22, 1:19 pm)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Mon Dec 22, 1:36 pm)
Re: TSC not updating after resume: Bug or Feature?, Fabio Comolli, (Mon Dec 22, 1:39 pm)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Mon Dec 22, 2:13 pm)
Re: TSC not updating after resume: Bug or Feature?, Fabio Comolli, (Mon Dec 22, 2:35 pm)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Mon Dec 22, 3:05 pm)
Re: TSC not updating after resume: Bug or Feature?, Fabio Comolli, (Mon Dec 22, 3:12 pm)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Mon Dec 22, 3:16 pm)
Re: TSC not updating after resume: Bug or Feature?, Fabio Comolli, (Mon Dec 22, 3:29 pm)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Mon Dec 22, 3:33 pm)
Re: TSC not updating after resume: Bug or Feature?, Rafael J. Wysocki, (Mon Dec 22, 5:28 pm)
Re: TSC not updating after resume: Bug or Feature?, Rafael J. Wysocki, (Mon Dec 22, 5:47 pm)
Re: TSC not updating after resume: Bug or Feature?, Thomas Gleixner, (Tue Dec 23, 12:03 am)
Re: TSC not updating after resume: Bug or Feature?, Rafael J. Wysocki, (Tue Dec 23, 7:15 am)
Re: TSC not updating after resume: Bug or Feature?, Fabio Comolli, (Tue Dec 23, 12:42 pm)
Re: TSC not updating after resume: Bug or Feature?, Deepak Saxena, (Tue Dec 23, 3:03 pm)
Re: TSC not updating after resume: Bug or Feature?, Pavel Machek, (Wed Dec 24, 7:09 am)
Re: TSC not updating after resume: Bug or Feature?, Peter Zijlstra, (Fri Dec 26, 1:47 am)