mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 08/12] hrtimer: completely remove it_real_value
@ 2006-02-14 10:11 Roman Zippel
  2006-02-14 17:00 ` George Anzinger
  0 siblings, 1 reply; 4+ messages in thread
From: Roman Zippel @ 2006-02-14 10:11 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel, tglx, mingo


Remove the it_real_value from /proc/*/stat, during 1.2.x was the last
time it returned useful data (as it was directly maintained by the
scheduler), now it's only a waste of time to calculate it.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Ingo Molnar <mingo@elte.hu>

---

 fs/proc/array.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Index: linux-2.6-git/fs/proc/array.c
===================================================================
--- linux-2.6-git.orig/fs/proc/array.c	2006-02-13 22:29:44.000000000 +0100
+++ linux-2.6-git/fs/proc/array.c	2006-02-13 22:30:08.000000000 +0100
@@ -330,7 +330,6 @@ static int do_task_stat(struct task_stru
 	unsigned long  min_flt = 0,  maj_flt = 0;
 	cputime_t cutime, cstime, utime, stime;
 	unsigned long rsslim = 0;
-	DEFINE_KTIME(it_real_value);
 	struct task_struct *t;
 	char tcomm[sizeof(task->comm)];
 
@@ -386,7 +385,6 @@ static int do_task_stat(struct task_stru
 			utime = cputime_add(utime, task->signal->utime);
 			stime = cputime_add(stime, task->signal->stime);
 		}
-		it_real_value = task->signal->real_timer.expires;
 	}
 	ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0;
 	read_unlock(&tasklist_lock);
@@ -413,7 +411,7 @@ static int do_task_stat(struct task_stru
 	start_time = nsec_to_clock_t(start_time);
 
 	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
-%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \
+%lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \
 %lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
 		task->pid,
 		tcomm,
@@ -435,7 +433,6 @@ static int do_task_stat(struct task_stru
 		priority,
 		nice,
 		num_threads,
-		(long) ktime_to_clock_t(it_real_value),
 		start_time,
 		vsize,
 		mm ? get_mm_rss(mm) : 0,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 08/12] hrtimer: completely remove it_real_value
  2006-02-14 10:11 [PATCH 08/12] hrtimer: completely remove it_real_value Roman Zippel
@ 2006-02-14 17:00 ` George Anzinger
  2006-02-14 17:06   ` Roman Zippel
  0 siblings, 1 reply; 4+ messages in thread
From: George Anzinger @ 2006-02-14 17:00 UTC (permalink / raw)
  To: Roman Zippel; +Cc: Andrew Morton, linux-kernel, tglx, mingo

Roman Zippel wrote:
> Remove the it_real_value from /proc/*/stat, during 1.2.x was the last
> time it returned useful data (as it was directly maintained by the
> scheduler), now it's only a waste of time to calculate it.

This may be true but this changes the order of items presented making any 
"code" looking for items after it_real_value in the list look at the wrong 
thing.  If we are going to change this, I think we need some sort of version 
in the output.  Something that changes when ever the output format or content 
is modified in any way.

George

> 
> Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
> Acked-by: Ingo Molnar <mingo@elte.hu>
> 
> ---
> 
>  fs/proc/array.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> Index: linux-2.6-git/fs/proc/array.c
> ===================================================================
> --- linux-2.6-git.orig/fs/proc/array.c	2006-02-13 22:29:44.000000000 +0100
> +++ linux-2.6-git/fs/proc/array.c	2006-02-13 22:30:08.000000000 +0100
> @@ -330,7 +330,6 @@ static int do_task_stat(struct task_stru
>  	unsigned long  min_flt = 0,  maj_flt = 0;
>  	cputime_t cutime, cstime, utime, stime;
>  	unsigned long rsslim = 0;
> -	DEFINE_KTIME(it_real_value);
>  	struct task_struct *t;
>  	char tcomm[sizeof(task->comm)];
>  
> @@ -386,7 +385,6 @@ static int do_task_stat(struct task_stru
>  			utime = cputime_add(utime, task->signal->utime);
>  			stime = cputime_add(stime, task->signal->stime);
>  		}
> -		it_real_value = task->signal->real_timer.expires;
>  	}
>  	ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0;
>  	read_unlock(&tasklist_lock);
> @@ -413,7 +411,7 @@ static int do_task_stat(struct task_stru
>  	start_time = nsec_to_clock_t(start_time);
>  
>  	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
> -%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \
> +%lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \
>  %lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
>  		task->pid,
>  		tcomm,
> @@ -435,7 +433,6 @@ static int do_task_stat(struct task_stru
>  		priority,
>  		nice,
>  		num_threads,
> -		(long) ktime_to_clock_t(it_real_value),
>  		start_time,
>  		vsize,
>  		mm ? get_mm_rss(mm) : 0,
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

-- 
George Anzinger   george@wildturkeyranch.net
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 08/12] hrtimer: completely remove it_real_value
  2006-02-14 17:00 ` George Anzinger
@ 2006-02-14 17:06   ` Roman Zippel
  2006-02-15  3:53     ` George Anzinger
  0 siblings, 1 reply; 4+ messages in thread
From: Roman Zippel @ 2006-02-14 17:06 UTC (permalink / raw)
  To: George Anzinger; +Cc: Andrew Morton, linux-kernel, tglx, mingo

Hi,

On Tue, 14 Feb 2006, George Anzinger wrote:

> > Remove the it_real_value from /proc/*/stat, during 1.2.x was the last
> > time it returned useful data (as it was directly maintained by the
> > scheduler), now it's only a waste of time to calculate it.
> 
> This may be true but this changes the order of items presented making any
> "code" looking for items after it_real_value in the list look at the wrong
> thing.  If we are going to change this, I think we need some sort of version
> in the output.  Something that changes when ever the output format or content
> is modified in any way.

I think you missed this:

> > @@ -413,7 +411,7 @@ static int do_task_stat(struct task_stru
> >  	start_time = nsec_to_clock_t(start_time);
> >   	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
> > -%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu
> > \
> > +%lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \
                                            ^

bye, Roman

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 08/12] hrtimer: completely remove it_real_value
  2006-02-14 17:06   ` Roman Zippel
@ 2006-02-15  3:53     ` George Anzinger
  0 siblings, 0 replies; 4+ messages in thread
From: George Anzinger @ 2006-02-15  3:53 UTC (permalink / raw)
  To: Roman Zippel; +Cc: Andrew Morton, linux-kernel, tglx, mingo

Roman Zippel wrote:
> Hi,
> 
> On Tue, 14 Feb 2006, George Anzinger wrote:
> 
> 
>>>Remove the it_real_value from /proc/*/stat, during 1.2.x was the last
>>>time it returned useful data (as it was directly maintained by the
>>>scheduler), now it's only a waste of time to calculate it.
>>
>>This may be true but this changes the order of items presented making any
>>"code" looking for items after it_real_value in the list look at the wrong
>>thing.  If we are going to change this, I think we need some sort of version
>>in the output.  Something that changes when ever the output format or content
>>is modified in any way.
> 
> 
> I think you missed this:
> 
> 
>>>@@ -413,7 +411,7 @@ static int do_task_stat(struct task_stru
>>> 	start_time = nsec_to_clock_t(start_time);
>>>  	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
>>>-%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu
>>>\
>>>+%lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \
> 
>                                             ^
I think you are right.  Looks ok to me.

-- 
George Anzinger   george@wildturkeyranch.net
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-15  3:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-14 10:11 [PATCH 08/12] hrtimer: completely remove it_real_value Roman Zippel
2006-02-14 17:00 ` George Anzinger
2006-02-14 17:06   ` Roman Zippel
2006-02-15  3:53     ` George Anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®