The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [patch] 2.4-ac: real-time / scheduling information out of /proc
@ 2002-09-19 21:26 Robert Love
  2002-09-19 21:29 ` Robert Love
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Love @ 2002-09-19 21:26 UTC (permalink / raw)
  To: alan; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

Alan,

The attached patch exports scheduling policy and real-time priority from
/proc/<pid>/stats.

Support for reading this information is in procps CVS.

This information has been in 2.5 since 2.5.18.

It does not break old versions of procps as it just adds the new entries
to the end.  I do not know what the practice is wrt adding proc fields
in stable kernels, however since this does not break procps, is
supported by current procps, and is in 2.5 -- it is perfectly safe to
me.

Patch is against 2.4.20-pre7-ac3, please apply.

	Robert Love


[-- Attachment #2: proc-add-rt-info-rml-2.4.20-pre7-ac3-1.patch --]
[-- Type: text/x-patch, Size: 724 bytes --]

diff -urN linux-2.4.20-pre7-ac3/fs/proc/array.c linux/fs/proc/array.c
--- linux-2.4.20-pre7-ac3/fs/proc/array.c	Thu Sep 19 16:10:34 2002
+++ linux/fs/proc/array.c	Thu Sep 19 17:18:36 2002
@@ -346,7 +346,7 @@
 	read_unlock(&tasklist_lock);
 	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
 %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %lu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d\n",
+%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
 		task->pid,
 		task->comm,
 		state,
@@ -389,7 +389,9 @@
 		task->nswap,
 		task->cnswap,
 		task->exit_signal,
-		task_cpu(task));
+		task_cpu(task)
+		task->rt_priority,
+		task->policy);
 	if(mm)
 		mmput(mm);
 	return res;

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

* Re: [patch] 2.4-ac: real-time / scheduling information out of /proc
  2002-09-19 21:26 [patch] 2.4-ac: real-time / scheduling information out of /proc Robert Love
@ 2002-09-19 21:29 ` Robert Love
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Love @ 2002-09-19 21:29 UTC (permalink / raw)
  To: alan; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 653 bytes --]

On Thu, 2002-09-19 at 17:26, Robert Love wrote:

> The attached patch exports scheduling policy and real-time priority from
> /proc/<pid>/stats.
> 
> Support for reading this information is in procps CVS.
> 
> This information has been in 2.5 since 2.5.18.
> 
> It does not break old versions of procps as it just adds the new entries
> to the end.  I do not know what the practice is wrt adding proc fields
> in stable kernels, however since this does not break procps, is
> supported by current procps, and is in 2.5 -- it is perfectly safe to
> me.
> 
> Patch is against 2.4.20-pre7-ac3, please apply.

Ugh, missing a comma.  Sorry,

	Robert Love




[-- Attachment #2: proc-add-rt-info-rml-2.4.20-pre7-ac3-1.patch --]
[-- Type: text/x-patch, Size: 725 bytes --]

diff -urN linux-2.4.20-pre7-ac3/fs/proc/array.c linux/fs/proc/array.c
--- linux-2.4.20-pre7-ac3/fs/proc/array.c	Thu Sep 19 16:10:34 2002
+++ linux/fs/proc/array.c	Thu Sep 19 17:18:36 2002
@@ -346,7 +346,7 @@
 	read_unlock(&tasklist_lock);
 	res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
 %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %lu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d\n",
+%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
 		task->pid,
 		task->comm,
 		state,
@@ -389,7 +389,9 @@
 		task->nswap,
 		task->cnswap,
 		task->exit_signal,
-		task_cpu(task));
+		task_cpu(task),
+		task->rt_priority,
+		task->policy);
 	if(mm)
 		mmput(mm);
 	return res;

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

end of thread, other threads:[~2002-09-19 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-19 21:26 [patch] 2.4-ac: real-time / scheduling information out of /proc Robert Love
2002-09-19 21:29 ` Robert Love

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