diff options
author | Tomas Janousek <tjanouse@redhat.com> | 2007-07-16 02:39:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:41 -0400 |
commit | 924b42d5a2dbe508407a0a6290d3751f826bccdd (patch) | |
tree | c13a647ae93bcf033bddb713c1e117e84698c679 /fs/proc/proc_misc.c | |
parent | 7c3f1a573237b90ef331267260358a0ec4ac9079 (diff) |
Use boot based time for process start time and boot time in /proc
Commit 411187fb05cd11676b0979d9fbf3291db69dbce2 caused boot time to move and
process start times to become invalid after suspend. Using boot based time
for those restores the old behaviour and fixes the issue.
[akpm@linux-foundation.org: little cleanup]
Signed-off-by: Tomas Janousek <tjanouse@redhat.com>
Cc: Tomas Smetana <tsmetana@redhat.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r-- | fs/proc/proc_misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 5fd49e47f83a..19c9cbf1c320 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -443,12 +443,12 @@ static int show_stat(struct seq_file *p, void *v) | |||
443 | unsigned long jif; | 443 | unsigned long jif; |
444 | cputime64_t user, nice, system, idle, iowait, irq, softirq, steal; | 444 | cputime64_t user, nice, system, idle, iowait, irq, softirq, steal; |
445 | u64 sum = 0; | 445 | u64 sum = 0; |
446 | struct timespec boottime; | ||
446 | 447 | ||
447 | user = nice = system = idle = iowait = | 448 | user = nice = system = idle = iowait = |
448 | irq = softirq = steal = cputime64_zero; | 449 | irq = softirq = steal = cputime64_zero; |
449 | jif = - wall_to_monotonic.tv_sec; | 450 | getboottime(&boottime); |
450 | if (wall_to_monotonic.tv_nsec) | 451 | jif = boottime.tv_sec; |
451 | --jif; | ||
452 | 452 | ||
453 | for_each_possible_cpu(i) { | 453 | for_each_possible_cpu(i) { |
454 | int j; | 454 | int j; |