Bug 103648 - priority print problem in "top" utility from procps 2.0.11 package
priority print problem in "top" utility from procps 2.0.11 package
Status: CLOSED DUPLICATE of bug 90030
Product: Red Hat Linux
Classification: Retired
Component: procps (Show other bugs)
9
i686 Linux
low Severity low
: ---
: ---
Assigned To: Alexander Larsson
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-03 11:12 EDT by christophe chevance
Modified: 2006-02-21 13:58 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:58:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description christophe chevance 2003-09-03 11:12:30 EDT
Description of problem:

when kernel module md.o is loaded, mdrecoveryd is shown by top with a 
very very low priority instead of -1


Version-Release number of selected component (if applicable):
    procps-2.0.11

How reproducible:
   always

Steps to Reproduce:
1.load md.o kernel module
2. type "top" in a command shell
3. find mdrecoveryd line
    
Actual results:
65 processes: 64 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states:   0.5% user   0.0% system    0.0% nice   0.0% iowait  99.0% idle
CPU1 states:   0.0% user   0.0% system    0.0% nice   0.0% iowait 100.0% idle
Mem:  1292928k av, 1036472k used,  256456k free,       0k shrd,  229500k buff
       492712k active,             411412k inactive
Swap: 1117896k av,    9696k used, 1108200k free                  650448k cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
13550 root      16   0  6952 6952  1044 S     0.7  0.5   3:26   0 nmbd
27232 root      14   0  1188 1188   856 R     0.1  0.0   0:00   0 top
    1 root       9   0   472  444   420 S     0.0  0.0   2:12   0 init
    2 root       9   0     0    0     0 SW    0.0  0.0   0:00   1 keventd
    3 root      19  19     0    0     0 SWN   0.0  0.0   0:00   0 ksoftirqd_CPU0
    4 root      19  19     0    0     0 SWN   0.0  0.0   0:00   1 ksoftirqd_CPU1
    5 root       9   0     0    0     0 SW    0.0  0.0   5:35   0 kswapd
    6 root       9   0     0    0     0 SW    0.0  0.0   0:00   0 bdflush
    7 root       9   0     0    0     0 SW    0.0  0.0  22:55   1 kupdated
   15 root       9   0     0    0     0 SW    0.0  0.0   0:17   1 kreiserfsd
   94 root       9   0     0    0     0 SW    0.0  0.0   0:00   1 khubd
  186 root     18446744073709551615 -20     0    0     0 SW<   0.0  0.0   0:00 
 1 mdrecoveryd


Expected results:

186 root     -1 -20     0    0     0 SW<   0.0  0.0   0:00   1 mdrecoveryd

Additional info:
I have a look in the code of procps-2.0.11. In top.c file at ligne n°1125
you		have :	
                        if (task->priority < -99)
				sprintf(tmp, " RT ");
			else
				sprintf(tmp, "%3llu ", task->priority);
I change %llu sprintf output format to %lld and rebuild all the stuff
The result seems to be OK.
I do not realy enter the code, then I'm not sure it's clean, but it looks like.

best regards
Christophe Chevance
Comment 1 Alexander Larsson 2003-09-25 05:01:19 EDT

*** This bug has been marked as a duplicate of 90030 ***
Comment 2 Red Hat Bugzilla 2006-02-21 13:58:24 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.