Re: [PATCH] Use boot based time for process start time and boot time in /proc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, May 10, 2007 at 04:40:47PM -0700, Andrew Morton wrote:
> On Thu, 10 May 2007 19:10:42 +0200
> Tomas Janousek <[email protected]> wrote:
> > @@ -918,7 +918,7 @@ struct task_struct {
> >  	unsigned int rt_priority;
> >  	cputime_t utime, stime;
> >  	unsigned long nvcsw, nivcsw; /* context switch counts */
> > -	struct timespec start_time;
> > +	struct timespec start_time, real_start_time;
> 
> no, please prefer to do
> 
> 	struct timespec start_time;
> 	struct timespec real_start_time;
> 
> which gives a nice place to add a comment documenting the field.
> 
> Please document fields.
> 
> What is the difference between start_time and real_start_time?

-------------------------
From: Tomas Janousek <[email protected]>
Date: Fri, 11 May 2007 10:38:47 +0200
Subject: [PATCH] Document start times in struct task_struct

Signed-off-by: Tomas Janousek <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Tomas Smetana <[email protected]>
Cc: John Stultz <[email protected]>
---
 include/linux/sched.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7eaa536..b852323 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -918,8 +918,8 @@ struct task_struct {
 	unsigned int rt_priority;
 	cputime_t utime, stime;
 	unsigned long nvcsw, nivcsw; /* context switch counts */
-	struct timespec start_time;
-	struct timespec real_start_time;
+	struct timespec start_time; 		/* monotonic time */
+	struct timespec real_start_time;	/* boot based time */
 /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
 	unsigned long min_flt, maj_flt;
 
-- 
1.5.1.4


-- 
TJ. (Brno, CZ), BaseOS, Red Hat
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux