| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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@
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
cpus calling hardclock and the statclock emulation. Move some ifdef
__HAVE_TIMECOUNTER code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
|
| |
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@
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|