[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070510164028.c38bef7b.akpm@linux-foundation.org>
Date: Thu, 10 May 2007 16:40:28 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Tomas Janousek <tjanouse@...hat.com>
Cc: john stultz <johnstul@...ibm.com>, linux-kernel@...r.kernel.org,
tsmetana@...hat.com, riel@...hat.com
Subject: Re: [PATCH] Introduce boot based time
On Thu, 10 May 2007 19:10:25 +0200
Tomas Janousek <tjanouse@...hat.com> wrote:
> The commits
> 411187fb05cd11676b0979d9fbf3291db69dbce2 (GTOD: persistent clock support)
> c1d370e167d66b10bca3b602d3740405469383de (i386: use GTOD persistent clock
> support)
> changed the monotonic time so that it no longer jumps after resume, but it's
> not possible to use it for boot time and process start time calculations then.
> Also, the uptime no longer increases during suspend.
>
> I add a variable to track the wall_to_monotonic changes, a function to get the
> real boot time and a function to get the boot based time from the monotonic
> one.
From: Andrew Morton <akpm@...ux-foundation.org>
- I don't think those sybols are needed in modules.
- Document total_sleep_time units (would have been better to call it
total_sleep_time_secs, perhaps).
Cc: John Stultz <johnstul@...ibm.com>
Cc: Tomas Janousek <tjanouse@...hat.com>
Cc: Tomas Smetana <tsmetana@...hat.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
kernel/time/timekeeping.c | 6 +-----
1 files changed, 1 insertion(+), 5 deletions(-)
diff -puN include/linux/time.h~introduce-boot-based-time-fix include/linux/time.h
diff -puN kernel/time/timekeeping.c~introduce-boot-based-time-fix kernel/time/timekeeping.c
--- a/kernel/time/timekeeping.c~introduce-boot-based-time-fix
+++ a/kernel/time/timekeeping.c
@@ -46,7 +46,7 @@ EXPORT_SYMBOL(xtime_lock);
*/
struct timespec xtime __attribute__ ((aligned (16)));
struct timespec wall_to_monotonic __attribute__ ((aligned (16)));
-static unsigned long total_sleep_time;
+static unsigned long total_sleep_time; /* seconds */
EXPORT_SYMBOL(xtime);
@@ -503,8 +503,6 @@ void getboottime(struct timespec *ts)
- wall_to_monotonic.tv_nsec);
}
-EXPORT_SYMBOL(getboottime);
-
/**
* monotonic_to_bootbased - Convert the monotonic time to boot based.
* @ts: pointer to the timespec to be converted
@@ -513,5 +511,3 @@ void monotonic_to_bootbased(struct times
{
ts->tv_sec += total_sleep_time;
}
-
-EXPORT_SYMBOL(monotonic_to_bootbased);
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists