summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Keep track of the number of times we trigger a reschedule before theart2000-03-031-1/+17
| | | | context switch actually happens.
* Use the LIST_FIRST macro to get the head of zombproc list.art2000-03-031-2/+2
|
* Use LIST_ macros instead of internal field names to walk the allproc list.art2000-03-031-4/+4
|
* Use stathz to calculate CPU time when available; fixes CPU calculationtholo1999-09-051-5/+14
| | | | problems when stathz runs at different speed than hz/profhz.
* Adopt NetBSD fix for scheduler problems (nice was broken). From the NetBSDpjanzen1999-08-151-9/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit messages: 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) * provide a new schedclock() mechanism at a new clock at schedhz, so high platform hz values don't cause nice +0 processes to look like they are niced * change the algorithm slightly, and reorganize the code a lot * fix percent-CPU calculation bugs, and eliminate some no-op code === nice bug === Correctly divide the scheduler queues between niced and compute-bound processes. The current nice weight of two (sort of, see `algorithm change' below) neatly divides the USRPRI queues in half; this should have been used to clip p_estcpu, instead of UCHAR_MAX. Besides being the wrong amount, clipping an unsigned char to UCHAR_MAX is a no-op, and it was done after decay_cpu() which can only _reduce_ the value. It has to be kept <= NICE_WEIGHT * PRIO_MAX - PPQ or processes can scheduler-penalize themselves onto the same queue as nice +20 processes. (Or even a higher one.) === New schedclock() mechanism === Some platforms should be cutting down stathz before hitting the scheduler, since the scheduler algorithm only works right in the vicinity of 64 Hz. Rather than prescale hz, then scale back and forth by 4 every time p_estcpu is touched (each occurance an abstraction violation), use p_estcpu without scaling and require schedhz to be generated directly at the right frequency. Use a default stathz (well, actually, profhz) / 4, so nothing changes unless a platform defines schedhz and a new clock. [ To do: Define these for alpha, where hz==1024, and nice was totally broke.] === Algorithm change === The nice value used to be added to the exponentially-decayed scheduler history value p_estcpu, in _addition_ to be incorporated directly (with greater weight) into the priority calculation. At first glance, it appears to be a pointless increase of 1/8 the nice effect (pri = p_estcpu/4 + nice*2), but it's actually at least 3x that because it will ramp up linearly but be decayed only exponentially, thus converging to an additional .75 nice for a loadaverage of one. I killed this: it makes the behavior hard to control, almost impossible to analyze, and the effect (~~nothing at for the first second, then somewhat increased niceness after three seconds or more, depending on load average) pointless. === Other bugs === hz -> profhz in the p_pctcpu = f(p_cpticks) calcuation. Collect scheduler functionality. Try to put each abstraction in just one place.
* Improved ps formatting.alex1999-04-211-11/+12
|
* uvm allocation and name changesart1999-02-261-1/+14
|
* GC unnecessary declarationart1998-11-151-2/+1
|
* bad types; wileyc@sekiya.twics.co.jpderaadt1998-02-031-3/+3
|
* Updates for VFS Lite 2 + soft update.csapuntz1997-11-061-2/+2
|
* fix printf formatting of "ps" (aka "show all proc") so that lines neverchuck1997-11-041-19/+58
| | | | | | | | | overflow (always hated that). replaced "/m" flag with: /a == show process address info /n == show normal process info [currently the default] /w == show process wait/emul info
* back out vfs lite2 till after 2.2deraadt1997-10-061-2/+2
|
* VFS Lite2 Changescsapuntz1997-10-061-2/+2
|
* two unneeded variables; enami@ba2.so-net.or.jpderaadt1997-07-281-3/+1
|
* asm -> __asmbriggs1997-01-191-3/+3
|
* remrq -> remrunqueuekstailey1996-11-231-2/+2
|
* sync syscalls, no sys/cpu.hderaadt1996-05-021-3/+2
|
* partial sync with netbsd 960418, more to comederaadt1996-04-211-5/+5
|
* From NetBSD: 960217 mergeniklas1996-03-031-8/+20
|
* initial import of NetBSD treederaadt1995-10-181-0/+727