| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
unused since v1.76, ca 5.3
ok kettenis@ deraadt@
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
| |
it has no pads, but a future ABI change could add something and leak
kernel memory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
OK mikeb@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
cpu_info.
|
|
|
|
|
| |
don't need to be married.
ok guenther miod beck jsing kettenis
|
| |
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
ok miod
|
|
|
|
|
| |
.h files to pull it in, if needed
ok tedu
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
at this moment.
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
|
|
| |
profil() by moving P_PROFIL from proc->p_flag to process->ps_flags with
matching adjustment in fork1() and exit1()
ok matthew@
|
|
|
|
|
|
| |
just the realtime clock, triggering and adjusting timeouts to reflect that.
ok matthew@ deraadt@
|
|
|
|
|
|
|
| |
of per-rthread. Handling of per-thread tick and runtime counters
inspired by how FreeBSD does it.
ok kettenis@
|
|
|
|
|
|
| |
into struct process.
ok tedu@ deraadt@
|
|
|
|
| |
ok krw@, "of course" tedu@
|
|
|
|
|
| |
from Brad Tilley <brad at 16systems dot com>;
ok oga@
|
|
|
|
| |
ok jsing@, miod@
|
|
|
|
|
| |
value of kern.clockrate with sysctl(3) correctly sets errno on failure.
PR #6040, ok tedu@
|
|
|
|
|
|
| |
high HZ) set it to 1, to avoid various divide-by-zero errors later
Based on discussion in PR 5511
ok miod
|
|
|
|
| |
out-of-bounds array accesses on some platforms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
have cpu_info now, so kill the option.
eyeballed by jsg@ and grange@
|
|
|
|
| |
ok art@ kettenis@
|
|
|
|
| |
from brad.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
frame, use it to report profiling information via addupc_intr().
|
|
|
|
| |
Loosely based on dragonfly code. ok deraadt@
|
| |
|
|
|
|
|
| |
and attempt to compensate for incorrect clocks by adjusting ticks
slowly. ok deraadt
|
| |
|
|
|
|
| |
'go for it' deraadt@
|
|
|
|
| |
from ray lai;
|
|
|
|
|
|
| |
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
|