| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
| |
declarations (extern int foo), and compensate in the appropriate locations.
|
| |
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
| |
infrastructure. ok art@ and miod@
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
(Look ma, I might have broken the tree)
|
| |
|
|
| |
From NetBSD.
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|