2.4-ac: real-time / scheduling information out of /proc

2.4-ac: real-time / scheduling information out of /proc

Post by Robert Lov » Sat, 21 Sep 2002 06:40:04



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

  proc-add-rt-info-rml-2.4.20-pre7-ac3-1.patch
< 1K Download
 
 
 

2.4-ac: real-time / scheduling information out of /proc

Post by Robert Lov » Sat, 21 Sep 2002 06:40:07



> 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

  proc-add-rt-info-rml-2.4.20-pre7-ac3-1.patch
< 1K Download

 
 
 

1. 2.4: export scheduling information from /proc

Menacing Marcelo,

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

This code is in 2.4-ac and 2.5.

This does _not_ break previous versions of procps -- there is no harm
and it is fully backward compatible.  New versions, starting with 2.0.8,
can parse this information.

Patch is against 2.4.20-pre9.  Please, apply.

        Robert Love

diff -urN linux-2.4.20-pre9/fs/proc/array.c linux/fs/proc/array.c
--- linux-2.4.20-pre9/fs/proc/array.c   2002-10-06 14:57:17.000000000 -0400

        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,

                task->nswap,
                task->cnswap,
                task->exit_signal,
-               task->processor);
+               task->processor,
+               task->rt_priority,
+               task->policy);
        if(mm)
                mmput(mm);
        return res;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. MWave modem

3. Mixed Time-Share & real-Time scheduling

4. HP JetDirect and Linux

5. Real-time Scheduling

6. SCSI Hardrive ProSCSI harddrive and linux file system probl

7. scheduler in 2.4 and real-time processes

8. Postix setup of smtp..

9. questions about poll(2) in real-time scheduling

10. unix real-time scheduling?

11. real-time scheduling on unix?

12. Real-time Scheduling

13. Real-time Clock on 2.4 x86?