[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070511084531.GA31854@redhat.com>
Date: Fri, 11 May 2007 10:45:31 +0200
From: Tomas Janousek <tjanouse@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: john stultz <johnstul@...ibm.com>, linux-kernel@...r.kernel.org,
tsmetana@...hat.com, riel@...hat.com
Subject: Re: [PATCH] Use boot based time for process start time and boot
time in /proc
Hello,
On Thu, May 10, 2007 at 04:40:47PM -0700, Andrew Morton wrote:
> Tomas Janousek <tjanouse@...hat.com> wrote:
> > @@ -445,12 +445,14 @@ static int show_stat(struct seq_file *p, void *v)
> > unsigned long jif;
> > cputime64_t user, nice, system, idle, iowait, irq, softirq, steal;
> > u64 sum = 0;
> > + struct timespec boottime;
> >
> > user = nice = system = idle = iowait =
> > irq = softirq = steal = cputime64_zero;
> > - jif = - wall_to_monotonic.tv_sec;
> > - if (wall_to_monotonic.tv_nsec)
> > - --jif;
> > + getboottime(&boottime);
> > + jif = boottime.tv_sec;
> > + if (boottime.tv_nsec)
> > + ++jif;
> >
>
> Is the switch from --jif to ++jif a functional change? If so, how come?
Yes, I'm afraid it was.
-----------------------
From: Tomas Janousek <tjanouse@...hat.com>
Date: Fri, 11 May 2007 10:34:55 +0200
Subject: [PATCH] Lower the boot time to seconds, not ceil
Restores the original behaviour of boot time calculation.
Signed-off-by: Tomas Janousek <tjanouse@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Tomas Smetana <tsmetana@...hat.com>
Cc: John Stultz <johnstul@...ibm.com>
---
fs/proc/proc_misc.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index d84956c..60b6210 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -452,8 +452,6 @@ static int show_stat(struct seq_file *p, void *v)
irq = softirq = steal = cputime64_zero;
getboottime(&boottime);
jif = boottime.tv_sec;
- if (boottime.tv_nsec)
- ++jif;
for_each_possible_cpu(i) {
int j;
--
1.5.1.4
--
Tomas Janousek, SW Engineer, Red Hat, Inc.
-
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