Skip to contentSkip to conversation

small doubt about fair-scheduler patch

DISCUSSION Kurt Johnson 2 participants 2 messages Dec 2, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

Im using your fair scheduler patch (2.4.19-fairsched), applied on top of 2.4.20-rmap15a+read_latency2, and everything seems great. However, I have one small doubt, ps output seems a little strange, some processes appear to be out of order. To illustrate, here's the output of ps. Im wondering, is this normal?

bash-2.0.5b# ps -eo pid,ppid,user,command

  PID  PPID USER     COMMAND
    3     1 root     [ksoftirqd_CPU0]
    2     1 root     [keventd]
    5     1 root     [kscand]
    6     1 root     [bdflush]
    8     1 root     [kreiserfsd]
  410     1 root     /sbin/dhcpcd eth0
  551     1 root     [eth1]
  613     1 root     klogd -x
  627     1 root     sshd
    1     0 root     init [3]
  682   627 root     sshd
  685   684 kurt     -bash
  760   685 root     su -
  799     1 root     xinetd
  604     1 root     syslogd -m 0
  820     1 snmp     /usr/sbin/snmpd
  841     1 root     logger -t safe_mysqld
  840     1 root     /bin/sh /usr/bin/safe_mysqld 
  870   840 mysql    /usr/sbin/mysqld
    4     1 root     [kswapd]
  894   885 httpd    /usr/sbin/httpd -DSSL
  893   885 httpd    /usr/sbin/httpd -DSSL
  885     1 root     /usr/sbin/httpd -DSSL
  898   885 httpd    /usr/sbin/httpd -DSSL
  680     1 root     portsentry -audp
  681     1 root     portsentry -atcp
  665     1 root     crond
    7     1 root     [kupdated]
  761   760 root     -bash
  684   682 kurt     sshd
 1003   761 root     ps -eo pid,ppid,user,command

Without the fairsched patch, ps output is normal, eg, init is always the first process listed, all kernel threads appear at the top (notice kswapd and kupdated near the bottom), and processes with lower pids never appear after others with higher (eg, portsentry is 680 and was started before httpd which is 898, yet it still appears after it). Im just wondering, is this purely aesthetically or is there something fishy?

Regards,

//kj

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

#1 lore raw
Quoted 7 lines · Kurt Johnson

Im using your fair scheduler patch (2.4.19-fairsched),

Without the fairsched patch, ps output is normal, eg, init is always the first process listed,

Im just wondering, is this
purely aesthetically or is there something fishy?

The fairsched patch reorders processes on the tasklist so that the processes of a user all get CPU time alternately.

It's just a cosmetic issue, caused by the fact that procfs walks that same list to display all the tasks and now that list can get reordered ...

regards,

Rik

Signature · 3 lines
Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/		http://guru.conectiva.com/
Current spamtrap:  <a href=mailto:"[email protected]">[email protected]</a>