I'm afraid that we have still problems with task scheduler:

Until 1999/11/28, it was known that a process with nice 20 were
capable to steal many CPU cycles from processes without nice.
1999/11/28 came commit
bde         1999/11/28 04:12:15 PST
  Scheduler fixes equivalent to the ones logged in the following NetBSD
  commit to kern_synch.c:
  Scheduler bug fixes and reorganization
  * fix the ancient nice(1) bug, where nice +20 processes incorrectly
    steal 10 - 20% of the CPU, (or even more depending on load average)
  === nice bug ===   Fixing this is the main point of this commit.  We use

These changes was before 4.x, so they are in 4.x and -current
and they solved troubles with stealing CPU cycles.

However, there was next fix
green       2000/04/30 11:33:44 PDT
  Change the scheduler to actually respect the PUSER barrier.  It's been
  wrong for many years that negative niceness would lower the priority
  The breakage could (and did) cause lock-ups, basically nothing else
  but the least nice program being able to run in some conditions.  The

This change was made only in -current, so it is missing in 4.x branch.
After this change, processes in -current with nice 20 again steal CPU
cycles from processes without nice. If I run commands
nice -0 perl -e 'while(1){}' &
nice -20 perl -e 'while(1){}' &
after some time top shows time 11:30 for perl-nice-0 and 4:00 (!!!)
for perl-nice-20. I think that it is even worse than before commit
on 1999/11/28.

After reading commit logs, I understand that:

* Scheduling in -current should not cause locks, but nice is again broken.
* Scheduling in -stable can cause locks (?!?), but nice works perfectly.

I could not believe that my understandings are correct. Please, could
anybody explain to me the real scheduler status?


Rudolf Cejka   ([EMAIL PROTECTED];  http://www.fee.vutbr.cz/~cejkar)
Brno University of Technology, Faculty of El. Engineering and Comp. Science
Bozetechova 2, 612 66  Brno, Czech Republic

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to