Up to [local] / src / sys / kern
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.123 / (download) - annotate - [select for diffs], Mon Feb 12 22:07:33 2024 UTC (3 months, 4 weeks ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
HEAD
Changes since 1.122: +1 -8 lines
Diff to previous 1.122 (colored)
kernel: disable hardclock() on secondary CPUs There is no useful work left for secondary CPUs to do in hardclock(). Disable cq_hardclock on secondary CPUs and remove the now-unnecessary early-return from hardclock(). This change reduces every system's normal clock interrupt rate by (HZ - HZ/10) per secondary CPU. For example, an 8-core machine with a HZ=100 kernel should see its clock interrupt rate drop from ~1600 to ~960. Thread: https://marc.info/?l=openbsd-tech&m=170750140915898&w=2 ok kettenis@
Revision 1.122 / (download) - annotate - [select for diffs], Fri Feb 9 17:42:18 2024 UTC (4 months ago) by cheloha
Branch: MAIN
Changes since 1.121: +1 -12 lines
Diff to previous 1.121 (colored)
dt(4): move interval/profile entry points to dedicated clockintr callback To improve the utility of dt(4)'s interval and profile probes we need to move the probe entry points from the fixed-frequency hardclock() to a dedicated clock interrupt callback so that the probes can fire at arbitrary frequencies. - Remove entry points for interval/profile probes from hardclock(). - Merge dt_prov_profile_enter(), dt_prov_interval_enter(), and dt_prov_profile_fire() into one function, dt_clock(). This is the now-unified callback for interval/profile probes. dt_clock() will consume multiple events during a single execution if it is delayed, but on platforms with high quality interrupt clocks this should be rare. - Each struct dt_pcb gets its own clockintr handle, dp_clockintr. - In struct dt_pcb, replace dp_maxtick/dp_nticks with dp_nsecs, the PCB's sampling period. Aynchronous probes must initialize dp_nsecs to a non-zero value during dtpv_alloc(). - In struct dt_pcb, replace dp_cpuid with dp_cpu so that dt_ioctl_record_start() knows where to bind the PCB's dp_clockintr. - dt_ioctl_record_start() binds, staggers, and starts all interval/profile PCBs on the given dt_softc. Each dp_clockintr is given a reference to its enclosing PCB so that dt_clock() doesn't need to search for it. The staggering sort-of simulates the current behavior under hardclock(). - dt_ioctl_record_stop() unbinds all interval/profile PCBs. The CL_BARRIER ensures that dp_clockintr's PCB reference is not in use by dt_clock() so that the PCB may be safely freed upon return from dt_ioctl_record_stop(). Blocking while holding dt_lock is not ideal, but in practice blocking in this spot is rare and dt_clock() completes quickly on all but the oldest hardware. An extremely unlucky thread could block for every interval/profile PCB on the softc, but this is implausible. DT_FA_PROFILE values are up-to-date for amd64, i386, and macppc. Somebody with the right hardware needs to check-and-maybe-fix the values on octeon, powerpc64, and sparc64. Joint effort with mpi@. Thread: https://marc.info/?l=openbsd-tech&m=170629371821879&w=2 ok mpi@
Revision 1.121 / (download) - annotate - [select for diffs], Tue Oct 17 00:04:02 2023 UTC (7 months, 3 weeks ago) by cheloha
Branch: MAIN
Changes since 1.120: +4 -4 lines
Diff to previous 1.120 (colored)
clockintr: move callback-specific API behaviors to "clockrequest" namespace The API's behavior when invoked from a callback function is impossible to document. Move the special behavior into a distinct namespace, "clockrequest". - Add a 'struct clockrequest'. Basically a stripped-down 'struct clockintr' for exclusive use during clockintr_dispatch(). - In clockintr_queue, replace the "cq_shadow" clockintr with a "cq_request" clockrequest. They serve the same purpose. - CLST_SHADOW_PENDING -> CR_RESCHEDULE; different namespace, same meaning. - CLST_IGNORE_SHADOW -> CLST_IGNORE_REQUEST; same meaning. - Move shadow branch in clockintr_advance() to clockrequest_advance(). - clockintr_request_random() becomes clockrequest_advance_random(). - Delete dead shadow branches in clockintr_cancel(), clockintr_schedule(). - Callback functions now get a clockrequest pointer instead of a special clockintr pointer: update all prototypes, callers. No functional change intended.
Revision 1.120 / (download) - annotate - [select for diffs], Wed Oct 11 15:42:44 2023 UTC (8 months ago) by cheloha
Branch: MAIN
Changes since 1.119: +7 -6 lines
Diff to previous 1.119 (colored)
kernel: expand fixed clock interrupt periods to 64-bit values Technically, all the current fixed clock interrupt periods fit within an unsigned 32-bit value. But 32-bit multiplication is an accident waiting to happen. So, expand the fixed periods for hardclock, statclock, profclock, and roundrobin to 64-bit values. One exception: statclock_mask remains 32-bit because random(9) yields 32-bit values. Update the initclocks() comment to make it clear that this is not an accident.
Revision 1.119 / (download) - annotate - [select for diffs], Thu Sep 14 22:27:09 2023 UTC (8 months, 3 weeks ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE,
OPENBSD_7_4
Changes since 1.118: +6 -1 lines
Diff to previous 1.118 (colored)
clockintr: move hz(9)-based initialization out to initclocks() To separate the hardclock from the clock interrupt subsystem we'll need to move all related state out first. hz(9) is set when we return from cpu_initclocks(), so it's safe to move hardclock_period and roundrobin_period initialization out into initclocks(). Move hardclock_period itself out into kern_clock.c alongside the statclock variables.
Revision 1.118 / (download) - annotate - [select for diffs], Thu Sep 14 20:58:51 2023 UTC (8 months, 3 weeks ago) by cheloha
Branch: MAIN
Changes since 1.117: +48 -13 lines
Diff to previous 1.117 (colored)
clockintr, statclock: eliminate clockintr_statclock() wrapper - Move remaining statclock variables from kern_clockintr.c to kern_clock.c. Move statclock variable initialization from clockintr_init() into initclocks(). - Change statclock() prototype to make it a legal clockintr callback function and establish the handle with statclock() instead clockintr_statclock(). - Merge the contents of clockintr_statclock() into statclock(). statclock() can now reschedule itself and handles multiple expirations transparently. - Make statclock_avg visible from sys/systm.h so that clockintr_cpu_init() can use it to advance the statclock across suspend/hibernate. Thread: https://marc.info/?l=openbsd-tech&m=169428749720476&w=2
Revision 1.117 / (download) - annotate - [select for diffs], Thu Sep 14 19:39:47 2023 UTC (8 months, 3 weeks ago) by cheloha
Branch: MAIN
Changes since 1.116: +3 -1 lines
Diff to previous 1.116 (colored)
clockintr: replace CL_RNDSTAT with global variable statclock_is_randomized In order to separate the statclock from the clock interrupt subsystem we need to move all statclock state out into the broader kernel. Start by replacing the CL_RNDSTAT flag with a new global variable, "statclock_is_randomized", in kern_clock.c. Update all clockintr_init() callers to set the boolean instead of passing the flag. Thread: https://marc.info/?l=openbsd-tech&m=169428749720476&w=2
Revision 1.116 / (download) - annotate - [select for diffs], Sat Sep 9 18:19:03 2023 UTC (9 months ago) by cheloha
Branch: MAIN
Changes since 1.115: +4 -8 lines
Diff to previous 1.115 (colored)
kernel: remove schedhz Now that alpha no longer sets schedhz, schedhz is a dead variable. Remove it. For now, leave the schedclock() call in place in statclock(). It still runs at its default rate of (stathz / 4). Part of mpi@'s WIP scheduler patch. Suggested by mpi@. Thread: https://marc.info/?l=openbsd-tech&m=169419781317781&w=2 ok mpi@
Revision 1.115 / (download) - annotate - [select for diffs], Wed Aug 23 01:55:45 2023 UTC (9 months, 2 weeks ago) by cheloha
Branch: MAIN
Changes since 1.114: +4 -1 lines
Diff to previous 1.114 (colored)
all platforms: separate cpu_initclocks() from cpu_startclock() To give the primary CPU an opportunity to perform clock interrupt preparation in a machine-independent manner we need to separate the "initialization" parts of cpu_initclocks() from the "start the clock interrupt" parts. Currently, cpu_initclocks() does everything all at once, so there is no space for this MI setup. Many platforms have more-or-less already done this separation by implementing a separate routine named "cpu_startclock()". This patch promotes cpu_startclock() from de facto standard to mandatory API. - Prototype cpu_startclock() in sys/systm.h alongside cpu_initclocks(). The separation of responsibility between the two routines is a bit fuzzy but the basic guidelines are as follows: + cpu_initclocks() must initialize hz, stathz, and profhz, and call clockintr_init(). + cpu_startclock() must call clockintr_cpu_init() and start the clock interrupt cycle on the calling CPU. These guidelines will shift in the future, but that's the way things stand as of *this* commit. - In initclocks(): first call cpu_initclocks(), then do MI setup, and last call cpu_startclock(). - On platforms where cpu_startclock() already exists: don't call cpu_startclock() from cpu_initclocks() anymore. - On platforms where cpu_startclock() doesn't yet exist: implement it. Usually this is as simple as dividing cpu_initclocks() in two. Tested on amd64 (i8254, lapic), arm64, i386 (i8254, lapic), macppc, mips64/octeon, and sparc64. Tested on arm/armv7 (agtimer(4)) by phessler@ and jmatthew@. Tested on m88k/luna88k by aoyama@. Tested on powerpc64 by gkoehler@ and mlarkin@. Tested on riscv64 by jmatthew@. Thread: https://marc.info/?l=openbsd-tech&m=169195251322149&w=2
Revision 1.114 / (download) - annotate - [select for diffs], Tue Aug 22 13:46:20 2023 UTC (9 months, 2 weeks ago) by jsg
Branch: MAIN
Changes since 1.113: +3 -7 lines
Diff to previous 1.113 (colored)
avoid an ifdef in hardclock() ok miod@ cheloha@
Revision 1.113 / (download) - annotate - [select for diffs], Sat Aug 12 13:19:28 2023 UTC (9 months, 4 weeks ago) by miod
Branch: MAIN
Changes since 1.112: +3 -1 lines
Diff to previous 1.112 (colored)
Repair compilability for non-MULTIPROCESSOR kernels.
Revision 1.112 / (download) - annotate - [select for diffs], Fri Aug 11 22:02:50 2023 UTC (10 months ago) by cheloha
Branch: MAIN
Changes since 1.111: +1 -4 lines
Diff to previous 1.111 (colored)
hardclock(9), roundrobin: make roundrobin() an independent clock interrupt - Remove the roundrobin() call from hardclock(9). - Revise roundrobin() to make it a valid clock interrupt callback. It is still periodic and it still runs at one tenth of the hardclock frequency. - Account for multiple expirations in roundrobin(): if two or more roundrobin periods have elapsed, set SPCF_SHOULDYIELD on the running thread immediately to simulate normal behavior. - Each schedstate_percpu has its own roundrobin() handle, spc_roundrobin. spc_roundrobin is started/advanced during clockintr_cpu_init(). Intervals elapsed across suspend/resume are discarded. - rrticks_init and schedstate_percpu.spc_rrticks are now useless: delete them. Tweaked by mpi@. With input from mpi@ and claudio@. Thread: https://marc.info/?l=openbsd-tech&m=169127381314651&w=2 ok mpi@ claudio@
Revision 1.111 / (download) - annotate - [select for diffs], Sat Aug 5 20:07:55 2023 UTC (10 months ago) by cheloha
Branch: MAIN
Changes since 1.110: +1 -30 lines
Diff to previous 1.110 (colored)
hardclock(9): move setitimer(2) code into itimer_update() - Move the setitimer(2) code responsible for updating the ITIMER_VIRTUAL and ITIMER_PROF timers from hardclock(9) into a new clock interrupt routine, itimer_update(). itimer_update() is periodic and runs at the same frequency as the hardclock. + Revise itimerdecr() to run within itimer_mtx instead of entering and leaving it. - Each schedstate_percpu has its own itimer_update() handle, spc_itimer. A new scheduler flag, SPCF_ITIMER, indicates whether spc_itimer was started during the last mi_switch() and needs to be stopped during the next mi_switch() or sched_exit(). - A new per-process flag, PS_ITIMER, indicates whether ITIMER_VIRTUAL and/or ITIMER_PROF are running. Checking the flag is easier than entering itimer_mtx to check process.ps_timer[]. The flag is set and cleared in a new helper function, process_reset_itimer_flag(). - In setitimer(), call need_resched() when the state of ITIMER_VIRTUAL or ITIMER_PROF is changed to force an mi_switch() and update spc_itimer. claudio@ notes that ITIMER_PROF could be implemented as a high-res timer using the thread's execution time as a guide for when to interrupt the process and assert SIGPROF. This would probably work really well in single-threaded processes. ITIMER_VIRTUAL would be more difficult to make high-res, though, as you need to exclude time spent in the kernel. Tested on powerpc64 by gkoehler@. With input from claudio@. Thread: https://marc.info/?l=openbsd-tech&m=169038818517101&w=2 ok claudio@
Revision 1.110 / (download) - annotate - [select for diffs], Tue Aug 1 07:57:55 2023 UTC (10 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.109: +3 -2 lines
Diff to previous 1.109 (colored)
Don't force early wrap around for jiffies. In inteldrm the function intel_dp_wait_source_oui() can be called before last_oui_write is set and so the code requires a positive initial jiffies value. On linux this is the case for 64bit systems (but not for 32bit) and because of this idiosyncracy this bug was introduced in upstream intel code. Instead of adding another OpenBSD specific quirk to drm code alter our jiffies initalisation. Systems affected are at least "ALDERLAKE_P, gen 12" and "TIGERLAKE, gen 12" Suggested fix by kettenis@ OK jsg@
Revision 1.109 / (download) - annotate - [select for diffs], Tue Jul 25 18:16:19 2023 UTC (10 months, 2 weeks ago) by cheloha
Branch: MAIN
Changes since 1.108: +5 -56 lines
Diff to previous 1.108 (colored)
statclock: move profil(2), GPROF code to profclock(), gmonclock() This patch isolates profil(2) and GPROF from statclock(). Currently, statclock() implements both profil(2) and GPROF through a complex mechanism involving both platform code (setstatclockrate) and the scheduler (pscnt, psdiv, and psratio). We have a machine-independent interface to the clock interrupt hardware now, so we no longer need to do it this way. - Move profil(2)-specific code from statclock() to a new clock interrupt callback, profclock(), in subr_prof.c. Each schedstate_percpu has its own profclock handle. The profclock is enabled/disabled for a given CPU when it is needed by the running thread during mi_switch() and sched_exit(). - Move GPROF-specific code from statclock() to a new clock interrupt callback, gmonclock(), in subr_prof.c. Where available, each cpu_info has its own gmonclock handle . The gmonclock is enabled/disabled for a given CPU via sysctl(2) in prof_state_toggle(). - Both profclock() and gmonclock() have a fixed period, profclock_period, that is initialized during initclocks(). - Export clockintr_advance(), clockintr_cancel(), clockintr_establish(), and clockintr_stagger() via <sys/clockintr.h>. They have external callers now. - Delete pscnt, psdiv, psratio. From schedstate_percpu, also delete spc_pscnt and spc_psdiv. The statclock frequency is not dynamic anymore so these variables are now useless. - Delete code/state related to the dynamic statclock frequency from kern_clockintr.c. The statclock frequency can still be pseudo-random, so move the contents of clockintr_statvar_init() into clockintr_init(). With input from miod@, deraadt@, and claudio@. Early revisions cleaned up by claudio. Early revisions tested by claudio@. Tested by cheloha@ on amd64, arm64, macppc, octeon, and sparc64 (sun4v). Compile- and boot- tested on i386 by mlarkin@. riscv64 compilation bugs found by mlarkin@. Tested on riscv64 by jca@. Tested on powerpc64 by gkoehler@.
Revision 1.108 / (download) - annotate - [select for diffs], Tue Apr 25 00:58:47 2023 UTC (13 months, 2 weeks ago) by cheloha
Branch: MAIN
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored)
addupc_intr: support adding multiple profiling ticks at once Add a third parameter to addupc_intr(), "u_long nticks". This will allow us to credit more than one profiling tick to the thread at once. Should be useful in the unusual case where the clock interrupt is masked for an extended period.
Revision 1.107 / (download) - annotate - [select for diffs], Fri Mar 3 20:16:44 2023 UTC (15 months, 1 week ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE,
OPENBSD_7_3
Changes since 1.106: +3 -6 lines
Diff to previous 1.106 (colored)
initclocks: don't reinitialize ticks, jiffies at runtime Various drivers use ticks/jiffies before initclocks(). It isn't generally safe to reinitialize them at runtime. Hoist the conditional definition of HZ from param.c into sys/kernel.h so we can see it from kern_clock.c and statically initialize ticks/jiffies to the desired offset. With this change, timeouts scheduled before initclocks() do not all fire immediately during the first softclock(). With input from kettenis@. Link: https://marc.info/?l=openbsd-tech&m=167753870803378&w=2
Revision 1.106 / (download) - annotate - [select for diffs], Sat Feb 4 19:33:03 2023 UTC (16 months ago) by cheloha
Branch: MAIN
Changes since 1.105: +6 -17 lines
Diff to previous 1.105 (colored)
kernel: stathz is always non-zero after cpu_initclocks() Now that the clockintr switch is complete, cpu_initclocks() always initializes stathz to a non-zero value. We don't call statclock() from hardclock(9) anymore and, more broadly, we don't need to test whether stathz is non-zero before using it. With input from kettenis@. Link: https://marc.info/?l=openbsd-tech&m=167434223309668&w=2 ok kettenis@ miod@
Revision 1.105 / (download) - annotate - [select for diffs], Sun Aug 14 01:58:27 2022 UTC (21 months, 4 weeks ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE,
OPENBSD_7_2
Changes since 1.104: +1 -3 lines
Diff to previous 1.104 (colored)
remove unneeded includes in sys/kern ok mpi@ miod@
Revision 1.104 / (download) - annotate - [select for diffs], Sun Jul 10 20:16:15 2022 UTC (23 months ago) by mlarkin
Branch: MAIN
Changes since 1.103: +2 -2 lines
Diff to previous 1.103 (colored)
Remove trailing whitespace. No code change.
Revision 1.103 / (download) - annotate - [select for diffs], Wed Feb 16 08:01:32 2022 UTC (2 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE,
OPENBSD_7_1
Changes since 1.102: +1 -3 lines
Diff to previous 1.102 (colored)
unifdef PROC_PC ok guenther@ rob@
Revision 1.102 / (download) - annotate - [select for diffs], Wed Jan 13 16:28:49 2021 UTC (3 years, 4 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE,
OPENBSD_7_0,
OPENBSD_6_9_BASE,
OPENBSD_6_9
Changes since 1.101: +1 -6 lines
Diff to previous 1.101 (colored)
kernel, sysctl(8): remove dead variable: tickadj The global "tickadj" variable is a remnant of the old NTP adjustment code we used in the kernel before the current timecounter subsystem was imported from FreeBSD circa 2004 or 2005. Fifteen years hence it is completely vestigial and we can remove it. We probably should have removed it long ago but I guess it slipped through the cracks. FreeBSD removed it in 2002: https://cgit.freebsd.org/src/commit/?id=e1d970f1811e5e1e9c912c032acdcec6521b2a6d NetBSD and DragonflyBSD can probably remove it, too. We export tickadj via the kern.clockrate sysctl(2), so update sysctl.2 and sysctl(8) accordingly. Hypothetically this change could break someone's sysctl(8) parsing script. I don't think that's very likely. ok mvs@
Revision 1.101 / (download) - annotate - [select for diffs], Tue Jan 21 16:16:23 2020 UTC (4 years, 4 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7
Changes since 1.100: +12 -1 lines
Diff to previous 1.100 (colored)
Import dt(4) a driver and framework for Dynamic Profiling. The design is fairly simple: events, in the form of descriptors on a ring, are being produced in any kernel context and being consumed by a userland process reading /dev/dt. Code and hooks are all guarded under '#if NDT > 0' so this commit shouldn't introduce any change as long as dt(4) is disable in GENERIC. ok kettenis@, visa@, jasper@, deraadt@
Revision 1.100 / (download) - annotate - [select for diffs], Sat Nov 2 16:56:17 2019 UTC (4 years, 7 months ago) by cheloha
Branch: MAIN
Changes since 1.99: +3 -12 lines
Diff to previous 1.99 (colored)
softclock: move softintr registration/scheduling into timeout module softclock() is scheduled from hardclock(9) because long ago callouts were processed from hardclock(9) directly. The introduction of timeout(9) circa 2000 moved all callout processing into a dedicated module, but the softclock scheduling stayed behind in hardclock(9). We can move all the softclock() "stuff" into the timeout module to make kern_clock.c a bit cleaner. Neither initclocks() nor hardclock(9) need to "know" about softclock(). The initial softclock() softintr registration can be done from timeout_proc_init() and softclock() can be scheduled from timeout_hardclock_update(). ok visa@
Revision 1.99 / (download) - annotate - [select for diffs], Fri Aug 2 02:17:35 2019 UTC (4 years, 10 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE,
OPENBSD_6_6
Changes since 1.98: +5 -5 lines
Diff to previous 1.98 (colored)
per-process itimers: itimerval -> itimerspec Loongson runs at 128hz. 128 doesn't divide evenly into a million, but it does divide evenly into a billion. So if we do the per-process itimer bookkeeping with itimerspec structs we can have error-free virtual itimers on loongson just as we do on most other platforms. This change doesn't fix the virtual itimer error alpha, as 1024 does not divide evenly into a billion. But this doesn't make the situation any worse, either. ok deraadt@
Revision 1.98 / (download) - annotate - [select for diffs], Mon Jan 28 11:49:04 2019 UTC (5 years, 4 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.97: +2 -3 lines
Diff to previous 1.97 (colored)
Simplify by using `spc' since we already have it, no behavior change.
Revision 1.97 / (download) - annotate - [select for diffs], Wed Oct 17 12:25:38 2018 UTC (5 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.96: +8 -9 lines
Diff to previous 1.96 (colored)
Only the scheduler time statistics should be affected by spinning. Change the process time accounting back to the original code before spinning time was added. No change for scheduler time. Spinning interrupts are no longer accounted to process system time. input and OK visa@
Revision 1.96 / (download) - annotate - [select for diffs], Wed Oct 10 00:04:54 2018 UTC (5 years, 8 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE,
OPENBSD_6_4
Changes since 1.95: +5 -3 lines
Diff to previous 1.95 (colored)
User land time accounting has changed when kernel spinning time was introduced. Account spinning time to the process system time again. time(1) has no spinning, it only shows real, user, sys. OK visa@ mpi@ deraadt@
Revision 1.95 / (download) - annotate - [select for diffs], Mon Jun 4 18:16:43 2018 UTC (6 years ago) by cheloha
Branch: MAIN
Changes since 1.94: +1 -15 lines
Diff to previous 1.94 (colored)
drop BUMPTIME unused since v1.76, ca 5.3 ok kettenis@ deraadt@
Revision 1.94 / (download) - annotate - [select for diffs], Mon May 14 12:31:21 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.93: +5 -2 lines
Diff to previous 1.93 (colored)
Stopping counting and reporting CPU time spent spinning on a lock as system time. Introduce a new CP_SPIN "scheduler state" and modify userland tools to display the % of timer a CPU spents spinning. Based on a diff from jmatthew@, ok pirofti@, bluhm@, visa@, deraadt@
Revision 1.93 / (download) - annotate - [select for diffs], Sat Jul 22 14:33:45 2017 UTC (6 years, 10 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE,
OPENBSD_6_3,
OPENBSD_6_2_BASE,
OPENBSD_6_2
Changes since 1.92: +5 -1 lines
Diff to previous 1.92 (colored)
Introduce jiffies, a volatile unsigned long version of our ticks variable for use by the linux compatibility APIs in drm(4). While I hate infecting code in sys/kern with this, untangling all the of having different types and different signedness is too much for me right now. The best strategy may be to change ticks itself to be long but that needs some careful auditing. ok deraadt@
Revision 1.92 / (download) - annotate - [select for diffs], Wed Apr 5 03:59:13 2017 UTC (7 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.91: +2 -1 lines
Diff to previous 1.91 (colored)
clear structure on the stack before copying out for sysctl. At present it has no pads, but a future ABI change could add something and leak kernel memory.
Revision 1.91 / (download) - annotate - [select for diffs], Sun Sep 4 09:22:29 2016 UTC (7 years, 9 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE,
OPENBSD_6_1
Changes since 1.90: +4 -4 lines
Diff to previous 1.90 (colored)
Introduce Dynamic Profiling, a ddb(4) based & gprof compatible kernel profiling framework. Code patching is used to enable probes when entering functions. The probes will call a mcount()-like function to match the behavior of a GPROF kernel. Currently only available on amd64 and guarded under DDBPROF. Support for other archs will follow soon. A new sysctl knob, ddb.console, need to be set to 1 in securelevel 0 to be able to use this feature. Inputs and ok guenther@
Revision 1.90 / (download) - annotate - [select for diffs], Thu Mar 24 05:40:56 2016 UTC (8 years, 2 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE,
OPENBSD_6_0
Changes since 1.89: +3 -1 lines
Diff to previous 1.89 (colored)
set ticks 15 seconds before its value wraps. this helps us identify issues around ticks wrap in 15 minutes instead of 240ish days. the change is inspired by something freebsd did as a result of a ticks change they made that went horribly wrong. lots of people said they wanted this
Revision 1.89 / (download) - annotate - [select for diffs], Sun Mar 20 07:56:08 2016 UTC (8 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.88: +2 -1 lines
Diff to previous 1.88 (colored)
Update ticks in hardclock(). OK mikeb@
Revision 1.88 / (download) - annotate - [select for diffs], Thu Jun 11 16:03:04 2015 UTC (9 years ago) by mikeb
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE,
OPENBSD_5_9,
OPENBSD_5_8_BASE,
OPENBSD_5_8
Changes since 1.87: +1 -54 lines
Diff to previous 1.87 (colored)
Move hzto(9) to the attic; OK dlg
Revision 1.87 / (download) - annotate - [select for diffs], Mon Sep 15 19:08:21 2014 UTC (9 years, 8 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE,
OPENBSD_5_7
Changes since 1.86: +1 -2 lines
Diff to previous 1.86 (colored)
Remove non-standard <sys/dkstat.h> header. It has not contained anything related to disk stastics for almost 17 years, and the remaining userland-visible defines duplicate those found in <sys/sched.h>. Move the remaining _KERNEL defines to <sys/tty.h> where they belong, and update all users to cope with this. ok kettenis@
Revision 1.86 / (download) - annotate - [select for diffs], Thu Sep 4 19:14:47 2014 UTC (9 years, 9 months ago) by miod
Branch: MAIN
Changes since 1.85: +1 -3 lines
Diff to previous 1.85 (colored)
Remove global cp_time[] array; no longer used now that all arches implement cpu_info.
Revision 1.85 / (download) - annotate - [select for diffs], Tue Jul 8 17:19:25 2014 UTC (9 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6
Changes since 1.84: +1 -2 lines
Diff to previous 1.84 (colored)
decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.h don't need to be married. ok guenther miod beck jsing kettenis
Revision 1.84 / (download) - annotate - [select for diffs], Tue Dec 24 01:11:00 2013 UTC (10 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.83: +17 -17 lines
Diff to previous 1.83 (colored)
rename local ticks to nticks to avoid aliasing global. ok krw
Revision 1.83 / (download) - annotate - [select for diffs], Tue Oct 8 03:50:07 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.82: +12 -37 lines
Diff to previous 1.82 (colored)
Fix delivery of SIGPROF and SIGVTALRM to threaded processes by having hardclock() set a flag on the running thread and force AST processing, and then have the thread signal itself from userret(). idea and flag names from FreeBSD ok jsing@
Revision 1.82 / (download) - annotate - [select for diffs], Tue Aug 13 05:52:23 2013 UTC (10 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.81: +3 -2 lines
Diff to previous 1.81 (colored)
Switch time_t, ino_t, clock_t, and struct kevent's ident and data members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
Revision 1.81 / (download) - annotate - [select for diffs], Wed Apr 24 17:29:02 2013 UTC (11 years, 1 month ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4
Changes since 1.80: +19 -1 lines
Diff to previous 1.80 (colored)
Add tstohz(9) as the timespec analog to tvtohz(9). ok miod
Revision 1.80 / (download) - annotate - [select for diffs], Thu Mar 28 16:55:25 2013 UTC (11 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.79: +1 -2 lines
Diff to previous 1.79 (colored)
do not include machine/cpu.h from a .c file; it is the responsibility of .h files to pull it in, if needed ok tedu
Revision 1.79 / (download) - annotate - [select for diffs], Tue Mar 12 09:37:16 2013 UTC (11 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)
Fix kernel profiling on MP systems by using per-CPU buffers and teach kgmon(8) to deal with them, this time without public header changes. Previously various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok deraadt@, mikeb@, haesbaert@
Revision 1.78 / (download) - annotate - [select for diffs], Tue Feb 12 08:06:22 2013 UTC (11 years, 4 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored)
Back out per-CPU kernel profiling, it shouldn't modify a public header at this moment.
Revision 1.77 / (download) - annotate - [select for diffs], Mon Feb 11 17:05:25 2013 UTC (11 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)
Fix kernel profiling on MP systems by using per-CPU buffer. Previously various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok mikeb@, haesbaert@
Revision 1.76 / (download) - annotate - [select for diffs], Mon Nov 5 19:39:34 2012 UTC (11 years, 7 months ago) by miod
Branch: MAIN
Changes since 1.75: +1 -147 lines
Diff to previous 1.75 (colored)
unifdef -D __HAVE_TIMECOUNTER
Revision 1.75 / (download) - annotate - [select for diffs], Thu Aug 2 03:18:48 2012 UTC (11 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.74: +12 -10 lines
Diff to previous 1.74 (colored)
Apply profiling to all threads instead of just the thread that called profil() by moving P_PROFIL from proc->p_flag to process->ps_flags with matching adjustment in fork1() and exit1() ok matthew@
Revision 1.74 / (download) - annotate - [select for diffs], Thu May 24 07:17:42 2012 UTC (12 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2
Changes since 1.73: +1 -4 lines
Diff to previous 1.73 (colored)
On resume, run forward the monotonic and realtimes clocks instead of jumping just the realtime clock, triggering and adjusting timeouts to reflect that. ok matthew@ deraadt@
Revision 1.73 / (download) - annotate - [select for diffs], Fri Mar 23 15:51:26 2012 UTC (12 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.72: +12 -17 lines
Diff to previous 1.72 (colored)
Make rusage totals, itimers, and profile settings per-process instead of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
Revision 1.72 / (download) - annotate - [select for diffs], Mon Mar 7 07:07:13 2011 UTC (13 years, 3 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE,
OPENBSD_5_1,
OPENBSD_5_0_BASE,
OPENBSD_5_0
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored)
The scheduling 'nice' value is per-process, not per-thread, so move it into struct process. ok tedu@ deraadt@
Revision 1.71 / (download) - annotate - [select for diffs], Fri Aug 20 22:03:22 2010 UTC (13 years, 9 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE,
OPENBSD_4_9
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)
Change hzto(9) and tvtohz(9) arguments to const pointers. ok krw@, "of course" tedu@
Revision 1.70 / (download) - annotate - [select for diffs], Thu Jan 14 23:12:11 2010 UTC (14 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE,
OPENBSD_4_8,
OPENBSD_4_7_BASE,
OPENBSD_4_7
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)
fix typos in comments, no code changes; from Brad Tilley <brad at 16systems dot com>; ok oga@
Revision 1.69 / (download) - annotate - [select for diffs], Wed Nov 4 19:14:10 2009 UTC (14 years, 7 months ago) by kettenis
Branch: MAIN
Changes since 1.68: +3 -23 lines
Diff to previous 1.68 (colored)
Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it. ok jsing@, miod@
Revision 1.68 / (download) - annotate - [select for diffs], Wed Jan 21 21:02:39 2009 UTC (15 years, 4 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE,
OPENBSD_4_6,
OPENBSD_4_5_BASE,
OPENBSD_4_5
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)
Pass the new pointer to sysctl_clockrate(), so that trying to change the value of kern.clockrate with sysctl(3) correctly sets errno on failure. PR #6040, ok tedu@
Revision 1.67 / (download) - annotate - [select for diffs], Sat Oct 4 15:21:59 2008 UTC (15 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.66: +6 -1 lines
Diff to previous 1.66 (colored)
At clock initialization, if we discover that tickadj is 0 (due to very high HZ) set it to 1, to avoid various divide-by-zero errors later Based on discussion in PR 5511 ok miod
Revision 1.66 / (download) - annotate - [select for diffs], Sat Mar 15 21:21:09 2008 UTC (16 years, 3 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE,
OPENBSD_4_4
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)
In statclock(), fix local index type in the profiling code. Avoids out-of-bounds array accesses on some platforms.
Revision 1.65 / (download) - annotate - [select for diffs], Wed Oct 10 15:53:53 2007 UTC (16 years, 8 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE,
OPENBSD_4_3
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored)
Make context switching much more MI: - Move the functionality of choosing a process from cpu_switch into a much simpler function: cpu_switchto. Instead of having the locore code walk the run queues, let the MI code choose the process we want to run and only implement the context switching itself in MD code. - Let MD context switching run without worrying about spls or locks. - Instead of having the idle loop implemented with special contexts in MD code, implement one idle proc for each cpu. make the idle loop MI with MD hooks. - Change the proc lists from the old style vax queues to TAILQs. - Change the sleep queue from vax queues to TAILQs. This makes wakeup() go from O(n^2) to O(n) there will be some MD fallout, but it will be fixed shortly. There's also a few cleanups to be done after this. deraadt@, kettenis@ ok
Revision 1.64 / (download) - annotate - [select for diffs], Wed May 16 17:27:30 2007 UTC (17 years, 1 month ago) by art
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE,
OPENBSD_4_2
Changes since 1.63: +9 -33 lines
Diff to previous 1.63 (colored)
The world of __HAVEs and __HAVE_NOTs is reducing. All architectures have cpu_info now, so kill the option. eyeballed by jsg@ and grange@
Revision 1.63 / (download) - annotate - [select for diffs], Tue Apr 17 17:57:32 2007 UTC (17 years, 1 month ago) by miod
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored)
Don't bother performing ITIMER accounting on P_SYSTEM processes (i.e. kthreads). ok art@ kettenis@
Revision 1.62 / (download) - annotate - [select for diffs], Sun Mar 25 11:35:01 2007 UTC (17 years, 2 months ago) by art
Branch: MAIN
Changes since 1.61: +1 -5 lines
Diff to previous 1.61 (colored)
Garbage collect CPU_CLOCKUPDATE since it was only used by i386. from brad.
Revision 1.61 / (download) - annotate - [select for diffs], Thu Mar 15 10:22:30 2007 UTC (17 years, 3 months ago) by art
Branch: MAIN
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored)
Since p_flag is often manipulated in interrupts and without biglock it's a good idea to use atomic.h operations on it. This mechanic change updates all bit operations on p_flag to atomic_{set,clear}bits_int. Only exception is that P_OWEUPC is set by MI code before calling need_proftick and it's automatically cleared by ADDUPC. There's no reason for MD handling of that flag since everyone handles it the same way. kettenis@ ok
Revision 1.60 / (download) - annotate - [select for diffs], Sun Dec 24 20:29:45 2006 UTC (17 years, 5 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE,
OPENBSD_4_1
Changes since 1.59: +6 -1 lines
Diff to previous 1.59 (colored)
If <machine/cpu.h> defines PROC_PC to compute the userland pc from an exception frame, use it to report profiling information via addupc_intr().
Revision 1.59 / (download) - annotate - [select for diffs], Wed Jun 14 19:52:07 2006 UTC (18 years ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE,
OPENBSD_4_0
Changes since 1.58: +22 -1 lines
Diff to previous 1.58 (colored)
Introducing adjfreq(2), to adjust the clock frequency. Loosely based on dragonfly code. ok deraadt@
Revision 1.58 / (download) - annotate - [select for diffs], Fri Jan 20 07:53:48 2006 UTC (18 years, 4 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE,
OPENBSD_3_9
Changes since 1.57: +2 -3 lines
Diff to previous 1.57 (colored)
revert auto-skew. some ntpd implementations interact poorly.
Revision 1.57 / (download) - annotate - [select for diffs], Fri Jan 13 22:02:37 2006 UTC (18 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.56: +3 -2 lines
Diff to previous 1.56 (colored)
auto adjusting adjtime. be more responsive to large clock deltas, and attempt to compensate for incorrect clocks by adjusting ticks slowly. ok deraadt
Revision 1.56 / (download) - annotate - [select for diffs], Tue Jan 3 18:22:31 2006 UTC (18 years, 5 months ago) by miod
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)
Make #undef match its temporary #define.
Revision 1.55 / (download) - annotate - [select for diffs], Mon Nov 28 00:14:28 2005 UTC (18 years, 6 months ago) by jsg
Branch: MAIN
Changes since 1.54: +9 -14 lines
Diff to previous 1.54 (colored)
ansi/deregister. 'go for it' deraadt@
Revision 1.52.4.1 / (download) - annotate - [select for diffs], Tue Nov 1 00:58:07 2005 UTC (18 years, 7 months ago) by brad
Branch: OPENBSD_3_8
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)
MFC: Fix by aaron@ In hardclock(), do not setup process virtual and profile timers if the process is in the midst of exiting. This solves a race condition that causes freed memory to be left referenced in the master kernel timeout worklist, leading to a uvm_fault (observed on an i386 MP system). ok deraadt@ aaron@
Revision 1.54 / (download) - annotate - [select for diffs], Tue Oct 25 15:49:37 2005 UTC (18 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)
dont' -> don't in comments; from ray lai;
Revision 1.52.2.1 / (download) - annotate - [select for diffs], Thu Oct 20 02:11:31 2005 UTC (18 years, 7 months ago) by brad
Branch: OPENBSD_3_7
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)
MFC: Fix by aaron@ In hardclock(), do not setup process virtual and profile timers if the process is in the midst of exiting. This solves a race condition that causes freed memory to be left referenced in the master kernel timeout worklist, leading to a uvm_fault (observed on an i386 MP system). ok deraadt@ aaron@
Revision 1.53 / (download) - annotate - [select for diffs], Mon Oct 3 01:19:44 2005 UTC (18 years, 8 months ago) by aaron
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)
In hardclock(), do not setup process virtual and profile timers if the process is in the midst of exiting. This solves a race condition that causes freed memory to be left referenced in the master kernel timeout worklist, leading to a uvm_fault (observed on an i386 MP system). tedu@, deraadt@, miod@ ok
Revision 1.52 / (download) - annotate - [select for diffs], Wed Nov 10 11:00:00 2004 UTC (19 years, 7 months ago) by grange
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE,
OPENBSD_3_7_BASE
Branch point for: OPENBSD_3_8,
OPENBSD_3_7
Changes since 1.51: +1 -2 lines
Diff to previous 1.51 (colored)
Diff from art@: Update ticks in timeout_hardclock_update to avoid errors in hardclock (this is the third time we mess up here). ticks is only used for timeouts anyway. At the same protect updating ticks with timeout_mutex and be slightly more paranoid in timeout_hardclock_update. ok tdeval@ miod@
Revision 1.51 / (download) - annotate - [select for diffs], Wed Sep 15 17:48:52 2004 UTC (19 years, 8 months ago) by grange
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)
Typo in #endif comment.
Revision 1.50 / (download) - annotate - [select for diffs], Thu Aug 5 13:45:30 2004 UTC (19 years, 10 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE,
OPENBSD_3_6
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)
Fix typos. Found by Dries Schellekens
Revision 1.49 / (download) - annotate - [select for diffs], Wed Aug 4 21:49:19 2004 UTC (19 years, 10 months ago) by art
Branch: MAIN
Changes since 1.48: +44 -3 lines
Diff to previous 1.48 (colored)
hardclock detects if ITIMER_VIRTUAL and ITIMER_PROF have expired and sends SIGVTALRM and SIGPROF to the process if they had. There is a big problem with calling psignal from hardclock on MULTIPROCESSOR machines though. It means we need to protect all signal state in the process with a lock because hardclock doesn't obtain KERNEL_LOCK. Trying to track down all the tentacles of this quickly becomes very messy. What saves us at the moment is that SCHED_LOCK (which is used to protect parts of the signal state, but not all) happens to be recursive and forgives small and big errors. That's about to change. So instead of trying to hunt down all the locking problems here, just make hardclock not send signals. Instead hardclock schedules a timeout that will send the signal later. There are many reasons why this works just as good as the previous code, all explained in a comment written in big, friendly letters in kern_clock. miod@ ok noone else dared to ok this, but noone screamed in agony either.
Revision 1.48 / (download) - annotate - [select for diffs], Wed Aug 4 16:29:32 2004 UTC (19 years, 10 months ago) by art
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)
Even when we have timecounters we still have to do the check for secondary cpus calling hardclock and the statclock emulation. Move some ifdef __HAVE_TIMECOUNTER code.
Revision 1.47 / (download) - annotate - [select for diffs], Wed Jul 28 17:15:12 2004 UTC (19 years, 10 months ago) by tholo
Branch: MAIN
Changes since 1.46: +24 -7 lines
Diff to previous 1.46 (colored)
This touches only MI code, and adds new time keeping code. The code is all conditionalized on __HAVE_TIMECOUNTER, and not enabled on any platforms. adjtime(2) support exists, courtesy of nordin@, sysctl(2) support and a concept of quality for each time source attached exists. High quality time sources exists for PIIX4 ACPI timer as well as some AMD power management chips. This will have to be redone once we actually add ACPI support (at that time we need to use the ACPI interfaces to get at these clocks). ok art@ ken@ miod@ jmc@ and many more
Revision 1.46 / (download) - annotate - [select for diffs], Thu Jun 24 19:35:24 2004 UTC (19 years, 11 months ago) by tholo
Branch: MAIN
Changes since 1.45: +76 -6 lines
Diff to previous 1.45 (colored)
This moves access to wall and uptime variables in MI code, encapsulating all such access into wall-defined functions that makes sure locking is done as needed. It also cleans up some uses of wall time vs. uptime some places, but there is sure to be more of these needed as well, particularily in MD code. Also, many current calls to microtime() should probably be changed to getmicrotime(), or to the {,get}microuptime() versions. ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others "Oh, that is not your problem!" from miod@
Revision 1.45 / (download) - annotate - [select for diffs], Mon Jun 21 23:50:35 2004 UTC (19 years, 11 months ago) by tholo
Branch: MAIN
Changes since 1.44: +6 -1 lines
Diff to previous 1.44 (colored)
First step towards more sane time handling in the kernel -- this changes things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@
Revision 1.44 / (download) - annotate - [select for diffs], Sun Jun 13 21:49:26 2004 UTC (20 years ago) by niklas
Branch: MAIN
Changes since 1.43: +14 -5 lines
Diff to previous 1.43 (colored)
debranch SMP, have fun
Revision 1.21.4.14 / (download) - annotate - [select for diffs], Thu Jun 10 11:40:33 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.21.4.13: +20 -25 lines
Diff to previous 1.21.4.13 (colored) to branchpoint 1.21 (colored) next main 1.22 (colored)
sync with head, make i386 __HAVE_CPUINFO
Revision 1.43 / (download) - annotate - [select for diffs], Wed Jun 9 20:18:28 2004 UTC (20 years ago) by art
Branch: MAIN
CVS Tags: SMP_SYNC_B,
SMP_SYNC_A
Changes since 1.42: +52 -13 lines
Diff to previous 1.42 (colored)
Merge in a piece of the SMP branch into HEAD. Introduce the cpu_info structure, p_cpu field in struct proc and global scheduling context and various changed code to deal with this. At the moment no architecture uses this stuff yet, but it will allow us slow and controlled migration to the new APIs. All new code is ifdef:ed out. ok deraadt@ niklas@
Revision 1.21.4.13 / (download) - annotate - [select for diffs], Sun Jun 6 21:46:12 2004 UTC (20 years ago) by tedu
Branch: SMP
Changes since 1.21.4.12: +8 -3 lines
Diff to previous 1.21.4.12 (colored) to branchpoint 1.21 (colored)
don't rely on curcpu() and other fixes for non-mp
Revision 1.21.4.12 / (download) - annotate - [select for diffs], Sun Jun 6 05:22:51 2004 UTC (20 years ago) by tedu
Branch: SMP
Changes since 1.21.4.11: +3 -2 lines
Diff to previous 1.21.4.11 (colored) to branchpoint 1.21 (colored)
tweak for non-smp case
Revision 1.21.4.11 / (download) - annotate - [select for diffs], Sat Jun 5 23:18:25 2004 UTC (20 years ago) by tedu
Branch: SMP
Changes since 1.21.4.10: +3 -1 lines
Diff to previous 1.21.4.10 (colored) to branchpoint 1.21 (colored)
few fixes to make non-smp compile
Revision 1.21.4.10 / (download) - annotate - [select for diffs], Sat Jun 5 17:19:55 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.21.4.9: +39 -4 lines
Diff to previous 1.21.4.9 (colored) to branchpoint 1.21 (colored)
Make a few scheduling globals per-cpu, mostly NetBSD code
Revision 1.21.4.9 / (download) - annotate - [select for diffs], Tue Mar 30 09:12:07 2004 UTC (20 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.21.4.8: +11 -1 lines
Diff to previous 1.21.4.8 (colored) to branchpoint 1.21 (colored)
who needs timetravel? not us!
Revision 1.21.4.8 / (download) - annotate - [select for diffs], Sat Jun 7 11:03:40 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.21.4.7: +2 -6 lines
Diff to previous 1.21.4.7 (colored) to branchpoint 1.21 (colored)
Sync SMP branch to -current
Revision 1.42 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:05 2003 UTC (21 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE,
OPENBSD_3_5,
OPENBSD_3_4_BASE,
OPENBSD_3_4
Changes since 1.41: +2 -6 lines
Diff to previous 1.41 (colored)
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
Revision 1.30.2.4 / (download) - annotate - [select for diffs], Mon May 19 22:31:09 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.30.2.3: +3 -2 lines
Diff to previous 1.30.2.3 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored)
sync
Revision 1.21.4.7 / (download) - annotate - [select for diffs], Fri May 16 00:29:43 2003 UTC (21 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.21.4.6: +2 -1 lines
Diff to previous 1.21.4.6 (colored) to branchpoint 1.21 (colored)
merge the trunk so we will get the genfs and locking fixes
Revision 1.41 / (download) - annotate - [select for diffs], Tue May 13 20:31:59 2003 UTC (21 years, 1 month ago) by miod
Branch: MAIN
CVS Tags: UBC_SYNC_A
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored)
Force "struct timeval time" variable to be aligned to an 8-bit boundary. This is at least necessary for the sparc microtime() function, and was only working before by goat luck. The recent commons removal triggered it. __atribute__ syntax borrowed from NetBSD.
Revision 1.21.4.6 / (download) - annotate - [select for diffs], Fri Mar 28 00:41:26 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.21.4.5: +8 -808 lines
Diff to previous 1.21.4.5 (colored) to branchpoint 1.21 (colored)
Sync the SMP branch with 3.3
Revision 1.30.2.3 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:44 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.30.2.2: +5 -796 lines
Diff to previous 1.30.2.2 (colored) to branchpoint 1.30 (colored)
sync to -current
Revision 1.40 / (download) - annotate - [select for diffs], Tue Sep 24 00:06:23 2002 UTC (21 years, 8 months ago) by nordin
Branch: MAIN
CVS Tags: UBC_SYNC_B,
OPENBSD_3_3_BASE,
OPENBSD_3_3,
OPENBSD_3_2_BASE,
OPENBSD_3_2
Changes since 1.39: +5 -1 lines
Diff to previous 1.39 (colored)
Restore pentium_microtime, testing by henning@, millert@. ok deraadt@
Revision 1.39 / (download) - annotate - [select for diffs], Sat Jul 6 19:14:20 2002 UTC (21 years, 11 months ago) by nordin
Branch: MAIN
Changes since 1.38: +2 -799 lines
Diff to previous 1.38 (colored)
Remove kernel support for NTP. ok deraadt@ and tholo@
Revision 1.38 / (download) - annotate - [select for diffs], Wed Jul 3 21:19:08 2002 UTC (21 years, 11 months ago) by miod
Branch: MAIN
Changes since 1.37: +3 -1 lines
Diff to previous 1.37 (colored)
Change all variables definitions (int foo) in sys/sys/*.h to variable declarations (extern int foo), and compensate in the appropriate locations.
Revision 1.30.2.2 / (download) - annotate - [select for diffs], Tue Jun 11 03:29:40 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.30.2.1: +51 -14 lines
Diff to previous 1.30.2.1 (colored) to branchpoint 1.30 (colored)
Sync UBC branch to -current
Revision 1.37 / (download) - annotate - [select for diffs], Fri Jun 7 21:20:02 2002 UTC (22 years ago) by art
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)
Change addupc_intr to not use fuswintr and suswintr to update the profiling 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@
Revision 1.36 / (download) - annotate - [select for diffs], Fri Jun 7 08:16:26 2002 UTC (22 years ago) by nordin
Branch: MAIN
Changes since 1.35: +3 -12 lines
Diff to previous 1.35 (colored)
Simplify so that we can remove CLKF_BASEPRI() and spllowersoftclock() infrastructure. ok art@ and miod@
Revision 1.35 / (download) - annotate - [select for diffs], Wed Apr 24 21:53:12 2002 UTC (22 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)
Introduce a new file, machine/internal_types.h, to hold that specific arch 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.
Revision 1.21.4.5 / (download) - annotate - [select for diffs], Wed Mar 6 02:13:23 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.21.4.4: +50 -7 lines
Diff to previous 1.21.4.4 (colored) to branchpoint 1.21 (colored)
Merge in trunk
Revision 1.34 / (download) - annotate - [select for diffs], Mon Feb 18 03:45:08 2002 UTC (22 years, 3 months ago) by nordin
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE,
OPENBSD_3_1
Changes since 1.33: +3 -7 lines
Diff to previous 1.33 (colored)
Don't do unnecessary normalization. ok art@
Revision 1.33 / (download) - annotate - [select for diffs], Fri Feb 15 20:55:26 2002 UTC (22 years, 3 months ago) by nordin
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)
Improve comment. ok art@
Revision 1.32 / (download) - annotate - [select for diffs], Fri Feb 15 01:59:26 2002 UTC (22 years, 4 months ago) by art
Branch: MAIN
Changes since 1.31: +51 -1 lines
Diff to previous 1.31 (colored)
Add a tvtohz function. Like hzto, but doesn't subtract the current time.
Revision 1.30.2.1 / (download) - annotate - [select for diffs], Thu Jan 31 22:55:40 2002 UTC (22 years, 4 months ago) by niklas
Branch: UBC
Changes since 1.30: +2 -8 lines
Diff to previous 1.30 (colored)
Merge in -current, builds on i386, otherwise untested
Revision 1.31 / (download) - annotate - [select for diffs], Wed Jan 2 06:07:41 2002 UTC (22 years, 5 months ago) by nordin
Branch: MAIN
Changes since 1.30: +2 -8 lines
Diff to previous 1.30 (colored)
Remove reference to timeout table. deraadt@ ok
Revision 1.30 / (download) - annotate - [select for diffs], Fri Dec 14 03:42:16 2001 UTC (22 years, 6 months ago) by nate
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.29: +4 -1 lines
Diff to previous 1.29 (colored)
New hz value needed by AlphaServer 1200 and a couple other machines
Revision 1.21.4.4 / (download) - annotate - [select for diffs], Tue Nov 13 23:04:23 2001 UTC (22 years, 7 months ago) by niklas
Branch: SMP
Changes since 1.21.4.3: +2 -2 lines
Diff to previous 1.21.4.3 (colored) to branchpoint 1.21 (colored)
merge in -current
Revision 1.29 / (download) - annotate - [select for diffs], Tue Nov 6 19:53:20 2001 UTC (22 years, 7 months ago) by miod
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)
Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary. (Look ma, I might have broken the tree)
Revision 1.21.4.3 / (download) - annotate - [select for diffs], Wed Oct 31 03:26:29 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.21.4.2: +30 -4 lines
Diff to previous 1.21.4.2 (colored) to branchpoint 1.21 (colored)
Sync the SMP branch to something just after 3.0
Revision 1.28 / (download) - annotate - [select for diffs], Sun Aug 19 06:10:09 2001 UTC (22 years, 9 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE,
OPENBSD_3_0
Changes since 1.27: +30 -4 lines
Diff to previous 1.27 (colored)
generic soft interrupts for softclock. From NetBSD.
Revision 1.21.4.2 / (download) - annotate - [select for diffs], Mon May 14 22:32:39 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.21.4.1: +43 -29 lines
Diff to previous 1.21.4.1 (colored) to branchpoint 1.21 (colored)
merge in approximately 2.9 into SMP branch
Revision 1.27 / (download) - annotate - [select for diffs], Wed Aug 23 20:36:18 2000 UTC (23 years, 9 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE,
OPENBSD_2_9,
OPENBSD_2_8_BASE,
OPENBSD_2_8
Changes since 1.26: +4 -8 lines
Diff to previous 1.26 (colored)
Move the updating of timeout queues to after ticks is incremented. 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.
Revision 1.26 / (download) - annotate - [select for diffs], Fri Jul 7 15:37:00 2000 UTC (23 years, 11 months ago) by art
Branch: MAIN
Changes since 1.25: +5 -5 lines
Diff to previous 1.25 (colored)
Make hzto return 0 for timeouts that should happen now or in the past.
Revision 1.25 / (download) - annotate - [select for diffs], Thu Jul 6 15:33:31 2000 UTC (23 years, 11 months ago) by ho
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)
Change splsoftclock() to spllowersoftclock(). (art@ ok)
Revision 1.24 / (download) - annotate - [select for diffs], Wed Jul 5 08:10:56 2000 UTC (23 years, 11 months ago) by pjanzen
Branch: MAIN
Changes since 1.23: +39 -21 lines
Diff to previous 1.23 (colored)
Stop sleeps from returning early (by up to a clock tick). From FreeBSD: eventually, we should replace hzto() with something like tvtohz() as well.
Revision 1.21.4.1 / (download) - annotate - [select for diffs], Fri Mar 24 09:09:23 2000 UTC (24 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.21: +4 -166 lines
Diff to previous 1.21 (colored)
Sync with -current
Revision 1.23 / (download) - annotate - [select for diffs], Thu Mar 23 11:20:45 2000 UTC (24 years, 2 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE,
OPENBSD_2_7
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)
Update a comment to reflect reality.
Revision 1.22 / (download) - annotate - [select for diffs], Thu Mar 23 09:59:57 2000 UTC (24 years, 2 months ago) by art
Branch: MAIN
Changes since 1.21: +3 -165 lines
Diff to previous 1.21 (colored)
New API for timeouts. Replaces the old timeout()/untimeout() API and 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.
Revision 1.21 / (download) - annotate - [select for diffs], Sun Aug 15 00:07:43 1999 UTC (24 years, 10 months ago) by pjanzen
Branch: MAIN
CVS Tags: kame_19991208,
SMP_BASE,
OPENBSD_2_6_BASE,
OPENBSD_2_6
Branch point for: SMP
Changes since 1.20: +11 -21 lines
Diff to previous 1.20 (colored)
Adopt NetBSD fix for scheduler problems (nice was broken). From the NetBSD 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.
Revision 1.20 / (download) - annotate - [select for diffs], Thu Aug 27 05:00:17 1998 UTC (25 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE,
OPENBSD_2_5,
OPENBSD_2_4_BASE,
OPENBSD_2_4
Changes since 1.19: +0 -2 lines
Diff to previous 1.19 (colored)
Undo changes which were not discussed.
Revision 1.19 / (download) - annotate - [select for diffs], Thu Aug 27 00:44:41 1998 UTC (25 years, 9 months ago) by mickey
Branch: MAIN
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored)
defopt NTP
Revision 1.18 / (download) - annotate - [select for diffs], Sun Feb 8 22:41:34 1998 UTC (26 years, 4 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE,
OPENBSD_2_3
Changes since 1.17: +4 -3 lines
Diff to previous 1.17 (colored)
Updates to match type changes in syscall tables
Revision 1.17 / (download) - annotate - [select for diffs], Tue Dec 30 19:07:29 1997 UTC (26 years, 5 months ago) by mickey
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)
make it compile w/ GPROF
Revision 1.16 / (download) - annotate - [select for diffs], Sun Nov 23 03:19:17 1997 UTC (26 years, 6 months ago) by mickey
Branch: MAIN
Changes since 1.15: +1 -16 lines
Diff to previous 1.15 (colored)
nuke prehistoric disk statistics
Revision 1.15 / (download) - annotate - [select for diffs], Sat Jan 25 23:35:58 1997 UTC (27 years, 4 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE,
OPENBSD_2_2,
OPENBSD_2_1_BASE,
OPENBSD_2_1
Changes since 1.14: +5 -5 lines
Diff to previous 1.14 (colored)
Don't do disruptive time corrections if tick size is not integral; from Dennis Ferguson (NetBSD PR #2788)
Revision 1.14 / (download) - annotate - [select for diffs], Sat Jan 25 23:31:47 1997 UTC (27 years, 4 months ago) by tholo
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)
Improve adjtime() for odd hz values; from Dennis Ferguson (NetBSD PR# 2787)
Revision 1.13 / (download) - annotate - [select for diffs], Mon Sep 9 04:50:33 1996 UTC (27 years, 9 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE,
OPENBSD_2_0
Changes since 1.12: +5 -2 lines
Diff to previous 1.12 (colored)
Don't claim a better precision than (1,000,000 / hz) us...
Revision 1.12 / (download) - annotate - [select for diffs], Sun Jun 9 03:47:29 1996 UTC (28 years ago) by briggs
Branch: MAIN
Changes since 1.11: +4 -3 lines
Diff to previous 1.11 (colored)
Declare tickfixcnt only ifndef NTP.
Revision 1.11 / (download) - annotate - [select for diffs], Fri May 3 07:42:39 1996 UTC (28 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.10: +2 -3 lines
Diff to previous 1.10 (colored)
Make pretty + update $NetBSD$ tag. No functional change.
Revision 1.10 / (download) - annotate - [select for diffs], Thu May 2 13:12:09 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.9: +1 -2 lines
Diff to previous 1.9 (colored)
sync syscalls, no sys/cpu.h
Revision 1.9 / (download) - annotate - [select for diffs], Sun Apr 21 22:26:53 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.8: +22 -13 lines
Diff to previous 1.8 (colored)
partial sync with netbsd 960418, more to come
Revision 1.8 / (download) - annotate - [select for diffs], Fri Apr 19 16:08:50 1996 UTC (28 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.7: +671 -266 lines
Diff to previous 1.7 (colored)
NetBSD 960317 merge
Revision 1.7 / (download) - annotate - [select for diffs], Sun Mar 3 17:19:41 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.6: +13 -1 lines
Diff to previous 1.6 (colored)
From NetBSD: 960217 merge
Revision 1.6 / (download) - annotate - [select for diffs], Sun Feb 25 23:00:25 1996 UTC (28 years, 3 months ago) by tholo
Branch: MAIN
Changes since 1.5: +4 -0 lines
Diff to previous 1.5 (colored)
Make it possible for a port to do special time update handling
Revision 1.5 / (download) - annotate - [select for diffs], Sun Feb 25 09:55:50 1996 UTC (28 years, 3 months ago) by tholo
Branch: MAIN
Changes since 1.4: +41 -12 lines
Diff to previous 1.4 (colored)
Implement frequency-locked loop as in original code; was missing
Revision 1.4 / (download) - annotate - [select for diffs], Mon Jan 29 23:05:06 1996 UTC (28 years, 4 months ago) by tholo
Branch: MAIN
Changes since 1.3: +396 -45 lines
Diff to previous 1.3 (colored)
Add kernel PLL for system clock Add ntp_adjtime() and ntp_gettime() system calls Mostly stolen from FreeBSD
Revision 1.3 / (download) - annotate - [select for diffs], Mon Jan 29 07:03:11 1996 UTC (28 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)
from netbsd: fix off-by-one error in tickfix code. (should increment when count >= interval, because count goes from 0->(interval-1) to count interval ticks.)
Revision 1.2 / (download) - annotate - [select for diffs], Sat Dec 30 09:24:36 1995 UTC (28 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)
from netbsd: Move the old-style disk instrumentation "structures" to a central location (sys/kern/subr_disk.c) and note that they should/will be deprecated.
Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:52:43 1995 UTC (28 years, 8 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)
initial import of NetBSD tree
Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:52:43 1995 UTC (28 years, 8 months ago) by deraadt
Branch: MAIN
Initial revision