summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_clock.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Change all variables definitions (int foo) in sys/sys/*.h to variablemiod2002-07-031-1/+3
| | | | declarations (extern int foo), and compensate in the appropriate locations.
* Change addupc_intr to not use fuswintr and suswintr to update the profilingart2002-06-071-2/+2
| | | | | | | | | info. Since we only use it to profile processes in user mode and there is no way to get back user mode without going past the AST that will write out the profiling info in a context where copyout works. Sitting in my tree for ages. Reviewed and with some suggestions from nordin@
* Simplify so that we can remove CLKF_BASEPRI() and spllowersoftclock()nordin2002-06-071-12/+3
| | | | infrastructure. ok art@ and miod@
* Introduce a new file, machine/internal_types.h, to hold that specific archespie2002-04-241-2/+2
| | | | | | | | | | | | | type characteristics. internal_types.h will contain only settings invisible from standard C, e.g., in the __* or _[A-Z]* namespace, and be reused by files like limits.h. This allows us to shorten machine/limits.h greatly, as all the common defines are now in sys/limits.h, plus a small stub in internal_types.h. Tested on all arches as far as I know. Approved after discussion with art, millert, deraadt, and others.
* Don't do unnecessary normalization. ok art@nordin2002-02-181-7/+3
|
* Improve comment. ok art@nordin2002-02-151-4/+4
|
* Add a tvtohz function. Like hzto, but doesn't subtract the current time.art2002-02-151-1/+51
|
* Remove reference to timeout table. deraadt@ oknordin2002-01-021-8/+2
|
* New hz value needed by AlphaServer 1200 and a couple other machinesnate2001-12-141-1/+4
|
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-2/+2
| | | | (Look ma, I might have broken the tree)
* generic soft interrupts for softclock.art2001-08-191-4/+30
| | | | From NetBSD.
* Move the updating of timeout queues to after ticks is incremented.art2000-08-231-8/+4
| | | | | | | | The older code actually ensured that no timeout would be too early, but it violated the principle of least surprise by making it seem (when you looked at the time variable) that every timeout was one tick late. Also periodic timeouts (that readd themselves in the timeout function), will now happen with the frequency you expect.
* Make hzto return 0 for timeouts that should happen now or in the past.art2000-07-071-5/+5
|
* Change splsoftclock() to spllowersoftclock(). (art@ ok)ho2000-07-061-2/+2
|
* Stop sleeps from returning early (by up to a clock tick).pjanzen2000-07-051-21/+39
| | | | | From FreeBSD: eventually, we should replace hzto() with something like tvtohz() as well.
* Update a comment to reflect reality.art2000-03-231-2/+2
|
* New API for timeouts. Replaces the old timeout()/untimeout() API andart2000-03-231-165/+3
| | | | | | | | | | | | | | makes it the callers responsibility to allocate resources for the timeouts. This is a KISS implementation and does _not_ solve the problems of slow handling of a large number of pending timeouts (this will be solved in future work) (although hardclock is now guarateed to take constant time for handling of timeouts). Old timeout() and untimeout() are implemented as wrappers around the new API and kept for compatibility. They will be removed as soon as all subsystems are converted to use the new API.
* Adopt NetBSD fix for scheduler problems (nice was broken). From the NetBSDpjanzen1999-08-151-21/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Undo changes which were not discussed.deraadt1998-08-271-3/+1
|
* defopt NTPmickey1998-08-271-1/+3
|
* Updates to match type changes in syscall tablestholo1998-02-081-3/+4
|
* make it compile w/ GPROFmickey1997-12-301-1/+2
|
* nuke prehistoric disk statisticsmickey1997-11-231-16/+1
|
* Don't do disruptive time corrections if tick size is not integral; fromtholo1997-01-251-5/+5
| | | | Dennis Ferguson (NetBSD PR #2788)
* Improve adjtime() for odd hz values; from Dennis Ferguson (NetBSD PR# 2787)tholo1997-01-251-2/+2
|
* Don't claim a better precision than (1,000,000 / hz) us...tholo1996-09-091-2/+5
|
* Declare tickfixcnt only ifndef NTP.briggs1996-06-091-3/+4
|
* Make pretty + update $NetBSD$ tag. No functional change.niklas1996-05-031-4/+3
|
* sync syscalls, no sys/cpu.hderaadt1996-05-021-2/+1
|
* partial sync with netbsd 960418, more to comederaadt1996-04-211-13/+22
|
* NetBSD 960317 mergeniklas1996-04-191-266/+671
|
* From NetBSD: 960217 mergeniklas1996-03-031-1/+13
|
* Make it possible for a port to do special time update handlingtholo1996-02-251-0/+4
|
* Implement frequency-locked loop as in original code; was missingtholo1996-02-251-12/+41
|
* Add kernel PLL for system clocktholo1996-01-291-45/+396
| | | | | Add ntp_adjtime() and ntp_gettime() system calls Mostly stolen from FreeBSD
* from netbsd:deraadt1996-01-291-2/+2
| | | | | | fix off-by-one error in tickfix code. (should increment when count >= interval, because count goes from 0->(interval-1) to count interval ticks.)
* from netbsd:deraadt1995-12-301-3/+3
| | | | | | Move the old-style disk instrumentation "structures" to a central location (sys/kern/subr_disk.c) and note that they should/will be deprecated.
* initial import of NetBSD treederaadt1995-10-181-0/+581