Age | Commit message (Collapse) | Author |
|
- 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
|
|
leave macros behind for now to keep the commit small
ok art beck miod pedro
|
|
for the list to become empty)
ok art
|
|
|
|
for the list to become empty)
|
|
|
|
|
|
currently already happens in exit1(), okay art@
|
|
a new struct. Instead of doing a huge rename and deal with the fallout
for weeks, like other projects that need no mention, we will slowly and
carefully move things out of struct proc into a new struct process.
- Create struct process and the infrastructure to create and remove them.
- Move threads in a process into struct process.
deraadt@, tedu@ ok
|
|
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
|
|
|
|
|
|
possible free()s; tedu@ deraadt@ ok
|
|
discussed with a few, ok tedu@
|
|
previously, the child and parent would deadlock in the kernel
and be unable to exit. help with diagnosis from art@.
|
|
uses rfork(RFTHREAD) to create threads, which are presently processes
that are a little more tightly bound together. several new syscalls
added to facilitate a userland thread library.
all conditional on RTHREADS, currently disabled.
ok deraadt
|
|
'go for it' deraadt@
|
|
ok miod@
|
|
no change in compiler assembly output.
|
|
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.
|
|
Also move the whole deadproc infrastructure to kern_exit, it's only used
there.
miod@ ok
|
|
|
|
ok art@ deraadt@
|
|
|
|
|
|
associated WIFCONTINUED macro as per 1003.1-2001. Adapted from FreeBSD.
A minor amount of trickiness is involved here. The value for WCONTINUED
is chosen in such a way that _WSTATUS(_WCONTINUED) == _WSTOPPED and the
WIFSTOPPED macro has been modified such that WIFSTOPPED(_WCONTINUED) !=
_WSTOPPED. This means we don't need to add an extra check to the
WIFSIGNALED and WIFSTOPPED macros. deraadt@ OK.
|
|
takes a void *. convert uiomove to take a void * as well. ok deraadt@
|
|
use them to correctly emulate linux brk.
update to TNF copyright in linux_exec.c.
from netbsd, mostly from a diff by Kurt Miller in pr3318.
this should fix java. no regressions in testing by kurt and sturm@.
be prepared for "proc size mismatch" -- recompile ps and friends.
ok deraadt@
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
That gives us the advantage of not being the active address space when
freeing the mappings in the pmap, which can lead to expensive TLB
flushes on some architectures.
plus some minor cleaning.
|
|
okay deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
(Look ma, I might have broken the tree)
|
|
|
|
|
|
|
|
|
|
kern_ipc_10.c for other compat modules.
|
|
on NetBSD's code, as well as some faked Posix RT extensions by me. This makes
at least simple linuxthreads tests work.
|
|
|
|
okay art@, millert@
|
|
Noone will wait for it (because noone is allowed to wait for it).
|
|
|
|
cpu_exit no longer frees the vmspace and u-area. This is now handled by a
separate kernel thread "reaper". This is to avoid sleeping locks in the
critical path of cpu_exit where we're not allowed to sleep.
From NetBSD
|
|
This is only needed in accounting and has to be done carefully because
the limit structures are shared between processes.
Found by Denis A. Doroshenko, analysed by Hannah Schroeter.
|
|
in a correct way. Use it in all places where the vnode was changed.
(most of the earlier code was incorrect and had races).
|