summaryrefslogtreecommitdiff
path: root/sys/kern/kern_synch.c
AgeCommit message (Collapse)Author
2001-11-11Let ltsleep take a const wmesg.Artur Grabowski
2001-11-06Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.Miod Vallat
(Look ma, I might have broken the tree)
2001-09-13Remove a comment that just doesn't make any sense.Artur Grabowski
2001-08-07Change tsleep into ltsleep.Artur Grabowski
ltsleep takes an additional argument - a simplelock and unlocks it when it's safe to do so. tsleep now becomes a wrapper around ltsleep. From NetBSD
2001-06-27remove old vmArtur Grabowski
2001-06-24cold is in systm.h nowMichael Shalayeff
2001-05-26indentation.Artur Grabowski
2001-03-25Reintroduce wakeup callConstantine Sapuntzakis
2001-03-15Print a '*' in front of curproc in ps in ddb.Artur Grabowski
2001-02-27Add wakeup_n and wakeup_one. wakeup_n will wakeup up to n sleeping processesConstantine Sapuntzakis
2001-02-19When doing an assertion for phz, just do it once when we set phz,Artur Grabowski
not once per process.
2000-11-10Change the ktrace interface functions from taking the trace vnode to taking theArtur Grabowski
traced proc. The vnode is in the proc and all functions need the proc.
2000-08-03s/principal/priciple/; from netbsdMichael Shalayeff
2000-07-06Typo in comment and some cleanup of roundrobin.Artur Grabowski
2000-06-27Slight optimization of wakeup.Artur Grabowski
2000-06-05Changes to exit handling.Artur Grabowski
cpu_exit no longer frees the vmspace and u-area. This is now handled by a separate kernel thread "reaper". This is to avoid sleeping locks in the critical path of cpu_exit where we're not allowed to sleep. From NetBSD
2000-04-19Remove the roundrobin_attempts hack and replace it with per-process schedulingArtur Grabowski
flags (much nicer for future smp work). Add two generic functions yield() and preempt(). Use preepmt() in uio when we are told to yield. Based on my idea, code written by Jason Thorpe from NetBSD.
2000-03-23Don't reinitialize the tsleep and ITIMER_REAL timers all the time.Artur Grabowski
The function and the argument never change.
2000-03-23use the new timeout interface for tsleep.Artur Grabowski
2000-03-23Adapt roundrobin and schedcpu to the new timeout API.Artur Grabowski
2000-03-03Keep track of the number of times we trigger a reschedule before theArtur Grabowski
context switch actually happens.
2000-03-03Use the LIST_FIRST macro to get the head of zombproc list.Artur Grabowski
2000-03-03Use LIST_ macros instead of internal field names to walk the allproc list.Artur Grabowski
1999-09-05Use stathz to calculate CPU time when available; fixes CPU calculationThorsten Lockert
problems when stathz runs at different speed than hz/profhz.
1999-08-15Adopt NetBSD fix for scheduler problems (nice was broken). From the NetBSDPaul Janzen
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.
1999-04-21Improved ps formatting.Alex Feldman
1999-02-26uvm allocation and name changesArtur Grabowski
1998-11-15GC unnecessary declarationArtur Grabowski
1998-02-03bad types; wileyc@sekiya.twics.co.jpTheo de Raadt
1997-11-06Updates for VFS Lite 2 + soft update.Constantine Sapuntzakis
1997-11-04fix printf formatting of "ps" (aka "show all proc") so that lines neverchuck
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
1997-10-06back out vfs lite2 till after 2.2Theo de Raadt
1997-10-06VFS Lite2 ChangesConstantine Sapuntzakis
1997-07-28two unneeded variables; enami@ba2.so-net.or.jpTheo de Raadt
1997-01-19asm -> __asmbriggs
1996-11-23remrq -> remrunqueuekstailey
1996-05-02sync syscalls, no sys/cpu.hTheo de Raadt
1996-04-21partial sync with netbsd 960418, more to comeTheo de Raadt
1996-03-03From NetBSD: 960217 mergeNiklas Hallqvist
1995-10-18initial import of NetBSD treeTheo de Raadt