Age | Commit message (Collapse) | Author |
|
|
|
|
|
ok matthew@ millert@
|
|
|
|
There is a race condition which might trigger a case where two cpus try
to run the same idle thread.
The problem arises when one cpu steals the idle proc of another cpu and
this other cpu ends up running the idle thread via spc->spc_idleproc,
resulting in two cpus trying to cpu_switchto(idleX).
On startup, idle procs are scaterred around different runqueues, the
decision for scheduling is:
1 look at my runqueue.
2 if empty, look at other dudes runqueue.
3 if empty, select idle proc via spc->spc_idleproc.
The problem is that cpu0's idle0 might be running on cpu1 due to step 1
or 2 and cpu0 hits step 3.
So cpu0 will select idle0, while cpu1 is in fact running it already.
The solution is to never place idle on a runqueue, therefore being
only selectable through spc->spc_idleproc.
This race can be more easily triggered on a HT cpu on virtualized
environments, where the guest more often than not doesn't have the cpu
for itself, so timing gets shuffled.
ok tedu@ guenther@
go ahead after t2k13 deraadt@
|
|
O_* flags and eliminating an XXX comment.
ok matthew@ deraadt@
|
|
exited pids that won't get recycled.
ok deraadt
|
|
ok deraadt
|
|
until it's fully built, so that it can't get a signal from
realitexpire(), as seen by sthen@ and espie@ in ports builds.
Exact bits moved down worked out with tedu@, ok deraadt@
|
|
ok matthew@ deraadt@
|
|
from Sylvestre Gallon ccna.syl gmail.com
|
|
ok deraadt@
|
|
|
|
it's now atomic_lock to better reflect its usage, and librthread now
features a new spinlock that's really a ticket lock.
thrlseep can handle both types of lock via a flag in the clock arg.
(temp back compat hack)
remove some old stuff that's accumulated along the way and no longer used.
some feedback from dlg, who is concerned with all things ticket lock.
(you need to boot a new kernel before installing librthread)
|
|
stacks by not returning (ever) from hibernate_unpack_image.
|
|
distinguish one failure path from another. Comment the same.
Also removed some extraneous comments regarding pmap_activate.
|
|
|
|
ok guenther matthew
|
|
with threaded processes. Fix this by checking for an attempt to go
single threaded in fork1 and account for the new thread as well.
ok espie guenther kurt
|
|
|
|
records. From FreeBSD via otto@, with tweaks suggested by guenther@.
Commite on behalf of otto@ who is not around, to ride the libc minor bump.
Causes a librthread minor bump as well (new syscall).
|
|
|
|
ok miod
|
|
executing code possibly causing side effects during the image unpack
operation. But before we can halt the APs, we need to complete their init
(as they will be hatched but idling, possibly with interrupts off).
Introduces MD function hibernate_quiesce_cpus to do this, called from the
MI hibernate resume code.
ok deraadt
|
|
ok guenther tedu deraadt
|
|
|
|
functions to enable and disable interrupts, if needed. If a platform doesnt
need interrupt handling in this way, the MD function can be a no-op.
discussed with pirofti and deraadt
|
|
|
|
cleaning up some shutdown-hook related code on the way.
(A few drivers related to sparc are still skipped at kettenis' request)
ok kettenis mlarkin, tested by many others too
|
|
|
|
ok matthew@
|
|
---------------------------
On the exit of the child process which parent either set SA_NOCLDWAIT
or ignored SIGCHLD, unconditionally wake up the parent instead of doing
this only when the child is a last child.
This brings us in line with other U**xes that support SA_NOCLDWAIT. If
the parent called waitpid(childpid), then exit of the child should wake
up the parent immediately instead of forcing it to wait for all children
to exit.
---------------------------
ok tedu@, millert@
|
|
|
|
this adds a tiny bit more protection from list manipulation.
|
|
|
|
|
|
originally by thib.
ok deraadt jsing and anyone who tested
|
|
|
|
sigmask even if there are no pending signals under the temporary
sigmask.
Refactor existing select() and poll() system calls to introduce the
pselect() and ppoll() system calls.
Add rthread wrappers for pselect() and ppoll(). While there, update
cancellation point comments to reflect recent fdatasync() addition.
Minor bumps for libc and librthread due to new symbols.
ok guenther, millert, deraadt, jmc
|
|
ok miod
|
|
anyone is waiting with kqueue their knotes may still have a reference to
the tty and later try to use it in the filt_tty* functions.
To avoid this, walk the knotes in ttyfree(), remove them from the tty's
list and invalidate them by setting kn_hook to NODEV. The filter
functions can then check for this and safely ignore the knotes.
ok tedu matthieu
|
|
the random pool as unique-esque-but-not-secret data.
inspired by conversations with tedu@/deraadt@
ok deraadt@
|
|
ok deraadt
|
|
order to detect double init mistakes. add a similar check and rearrange
pool_destory to detect the opposite mistake.
|
|
|
|
|
|
|
|
the special provided when the mount was requested. This may be the same as
the special that was actually used for the mount (e.g. in the case of a
device node) or it may be different (e.g. in the case of a DUID).
Whilst here, change f_ctime to a 64 bit type and remove the pointless
f_spare members.
Compatibility goo courtesy of guenther@
ok krw@ millert@
|
|
ok millert@
|
|
number match during signature block read during speculative unhibernate on
boot. If the magic number matches but we have otherwise chosen to not
unhibernate (due to kernel/memory mismatch), clear the signature block
early to avoid accidentally trying to unhibernate on subsequent boots. This
prevents accidental unhibernates and endless unhibernate/reboot cycles.
Add a define for HIBERNATE_DEBUG for various debugging printfs (disabled by
default).
Finally, change some KASSERTs to warning printfs (they probably shouldn't
have been KASSERTs in the first place).
"looks good" deraadt@
|