diff options
| author | Steve Muckle <smuckle@codeaurora.org> | 2014-11-13 18:06:59 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:01:06 -0700 |
| commit | 6370716bc33928f91d75ecb5173986c79dedb111 (patch) | |
| tree | 4b0f696a614e47259e17791395bbf71df5b395d0 /include/linux | |
| parent | 57ee8ef06eb2ac56c9c227e687e9df8d02bd691e (diff) | |
sched: do not set window until sched_clock is fully initialized
The system initially uses a jiffy-based sched clock. When the platform
registers a new timer for sched_clock, sched_clock can jump backwards.
Once sched_clock_postinit() runs it should be safe to rely on it.
Also sched_clock_cpu() relies on completion of sched_clock_init()
and until that happens sched_clock_cpu() returns zero. This is used
in the irq accounting path which window-based stats relies upon.
So do not set window_start until sched_clock_cpu() is working.
Change-Id: Ided349de8f8554f80a027ace0f63ea52b1c38c68
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index fd4d79416cdc..5398a8aea026 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2381,6 +2381,7 @@ extern u64 sched_clock_cpu(int cpu); extern void sched_clock_init(void); +extern int sched_clock_initialized(void); #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK static inline void sched_clock_tick(void) |
