Age | Commit message (Collapse) | Author |
|
Part of the larger 'proctreelk' diff from guenther@
No functional change, ok benno@, tedu@
|
|
we can relax the oversubscribe limit of socketbuffers a fair bit.
Instead of maxing out as sb_max * 1.125 or 2 * sb_hiwat the maximum is
increased to 8 * sb_hiwat -- which seems to be a good compromise between
memory waste and better socket buffer usage.
OK deraadt@
|
|
are pushed to disk. Dangling vnodes (unlinked files still in use) and
vnodes undergoing change by long-running syscalls are identified -- and
such filesystems are marked dirty on-disk while we are suspended (in case
power is lost, a fsck will be required). Filesystems without dangling or
busy vnodes are marked clean, resulting in faster boots following
"battery died" circumstances.
Tested by numerous developers, thanks for the feedback.
|
|
ok deraadt@
|
|
This is similar to what we do in sys_socketpair() and will allow us
to grab the KERNEL_LOCK() only after having created a socket.
ok tedu@
|
|
In 2016 natano@ removed the last two functions remaining from the CSRG
time: lockinit() and lockstatus(). At that time they were already wrappers
around recursive rwlocks functions from thib@ that tedu@ committed in 2013.
ok deraadt@
|
|
grabbing the rnglock repeatedly.
ok deraadt@ djm@
|
|
ok tedu@ deraadt@
|
|
|
|
Archs not yet converted can to the jump by defining __USE_MI_MUTEX.
ok visa@
|
|
no other process which could free it. Better panic in malloc(9)
or pool_get(9) instead of sleeping forever.
tested by visa@ patrick@ Jan Klemkow
suggested by kettenis@; OK deraadt@
|
|
ok dlg@
|
|
listeners of device state changes.
currently only supports NOTE_CHANGE that will be used by drm(4)
ok kettenis@
|
|
useful for loading CPU microcode from the disk before the CPUs are
let go.
Tested by visa@ on sgi, loongson and octeon
"don't see immediate issues" kettenis@
ok deraadt@
|
|
OK mpi@
|
|
be atomically read from any context.
ok bluhm@, visa@
|
|
Prevents an infinite pagefault/pmap_enter() loop when ktracing apps
doing a lot of futex(2) calls like firefox & chrome.
|
|
This will be soon be used to emulate BREAK commands in vmd(8).
ok nicm@, ccardenas@, deraadt@
|
|
corresponding user mode ioctls.
If the master part of the pseudo terminal previously enabled TIOCUCNTL,
it will now receive the TIOCUCNTL_{S,C}BRK commands. This allows to
send BREAKS commands over a pty(4) independently of the serial terminal
emulator used.
Guidance and ok nicm@, ok ccardenas@, looks ok to deraadt@
|
|
Currently there is only support for amd64, if this change settles
I will add support for the rest of the architectures.
OK kettenis@.
|
|
ok visa@, claudio@
|
|
untouched.
ok bluhm@, visa@
|
|
ok millert@ sthen@
|
|
if the size passed is exactly half the size of the bucket that the
allocation was actually from, then it was incorrect.
problem noted by florian@
ok florian@ visa@
|
|
Convert the hand rolled loop to strlcpy which gives us the size for
free(9).
OK visa
|
|
to be able to call free(9) with sizes.
off-by-one pointed out by guenther
OK visa
|
|
|
|
ok deraadt@ krw@
|
|
ok millert@ krw@
|
|
existing statekey in the mbuf header. Reset the statekey in
m_dup_pkthdr().
suggested by and OK sahan@
|
|
or other states more consistent.
OK visa@ sashan@ on a previous version
|
|
so only get it once
ok guenther
|
|
Nothing uses this field since Linux compat was removed.
ok mpi@ deraadt@ guenther@
|
|
ok bluhm@
|
|
ok bluhm@
|
|
ok bluhm@
|
|
It is not clear if this change is responsible for the lockups experienced
by dhill@ and jcs@ but since we're no longer grabbing the socket lock in
kqueue(2) filters there's no need for this change.
|
|
This change exposed or created a situation where a CPU started to be
irresponsive while holding the KERNEL_LOCK(). These led to lockups and
even with MP_LOCKDEBUG it was not clear what happened to this CPU.
These situations have been experience by dhill@ with dcrwallet and jcs@
with syncthing. Both applications are written in Go and do kevent(2)
& networking across multiple threads.
|
|
Prevents a deadlock in if_downall() when rw_enter() succeed without
really grabbing the lock.
Reported by and ok phessler@
|
|
and put it to use in userspace in lieu of the kern.boottime
sysctl.
Its absolute value is the time that has elapsed since the
system booted, i.e., the system uptime.
Use in top(1), w(1), and snmpd(8) eliminates a race with
settimeofday(2), adjtime(2), etc. inherent to deriving the
system uptime via the kern.boottime sysctl.
Product of a great deal of discussion/revision with jca@, tb@,
and guenther@.
ok tb@ jca@ guenther@ dlg@ mlarkin@ tom@
|
|
previously the code was using a percpu flag to manage the sleeps/wakeups,
which means multiple threads waiting for a barrier on a cpu could
race. moving to a cond struct on the stack fixes this.
while here, get rid of the sbar taskq and just use systqmp instead.
the barrier tasks are short, so there's no real downside.
ok mpi@
|
|
time; the aggressive mountpoint destruction seems to hit insane
use-after-frees when we are already far on the way down.
|
|
Change mountpoint to RDONLY a little later. Seems to improve the
rw->ro transition a bit.
|
|
|
|
|
|
this will be used to replace the bare sleep_state handling in a
bunch of places, starting with the barriers.
|
|
|
|
pledge for a new execve image immediately upon start. Also introduces
"error" which makes violations return -1 ENOSYS instead of killing the
program ("error" may not be handed to a setuid/setgid program, which
may be missing/ignoring syscall return values and would continue with
inconsistant state)
Discussion with many
florian has used this to improve the strictness of a daemon
|
|
OK krw@
|
|
for blocks re-fetchable from the filesystem. However at reboot time,
filesystems are unmounted, and since processes lack backing store they
are killed. Since the scheduler is still running, in some cases init is
killed... which drops us to ddb [noted by bluhm]. Solution is to convert
filesystems to read-only [proposed by kettenis]. The tale follows:
sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which
completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT()
with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a
copyin() late... so store the sizes in vfsconflist[] and move the copyin()
to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill
legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is
sharp and rusty especially wrt softdep, so fix some bugs adn add
~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help,
so tie them to &dead_vnops.
ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but
this issue is seperate and will be dealt with in time.
couple hundred reboots by bluhm and myself, advice from guenther and
others at the hut
|