lkml.org 
[lkml]   [2018]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] x86: tsc: avoid system instability in hibernation
On Wed, Jul 25, 2018 at 11:18:46AM -0700, Eduardo Valentin wrote:
> System instability are seen during resume from hibernation when system
> is under heavy CPU load. This is due to the lack of update of sched
> clock data, and the scheduler would then think that heavy CPU hog
> tasks need more time in CPU, causing the system to freeze
> during the unfreezing of tasks. For example, threaded irqs,
> and kernel processes servicing network interface may be delayed
> for several tens of seconds, causing the system to be unreachable.

> +static int tsc_pm_notifier(struct notifier_block *notifier,
> + unsigned long pm_event, void *unused)
> +{
> + switch (pm_event) {
> + case PM_HIBERNATION_PREPARE:
> + clear_sched_clock_stable();
> + break;
> + case PM_POST_HIBERNATION:
> + /* Set back to the default */
> + if (!check_tsc_unstable())
> + set_sched_clock_stable();
> + break;
> + }

I've not looked at this in detail yet, but this is an absolute no go,
not going to happen, full stop.

If we _ever_ mark the thing unstable, that's it, the end. Allowing it to
go back to stable is a source of utter fail.

\
 
 \ /
  Last update: 2018-07-27 09:51    [W:0.272 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site