init vfs so it can the size into account when creating its hash lists.
This means that for a 2GB system, it'll have a default of 65536 buckets
instead of 2048 and when you have 200,000+ vnodes that makes a significant
difference.
disabled loans for writes (a.k.a "direct write"), oops; use uio->uio_resid
for the check instead
don't bother updating uio->uio_offset in pipe_direct_write(), it's not used
by upper layers anyway
arrange things as needed. Unfortunately, the check in sockargs()
have to stay, since 4.3BSD bind(2), connect(2) and sendto(2) were
not versioned at the time :(
This code was tested to pass regression tests.
required. This duplicates the behavour used by DDB in db_stop_at_pc()
Architectures that emulate single step in software (SOFTWARE_SSTEP) don't
clear their temporary breakpoints making it impossible to restart on the
same instruction.
than PIPE_CHUNK_SIZE, just transfer first PIPE_CHUNK_SIZE and return short
write, expecting the caller to call us again later (if they need). Previous
behaviour (besides being wrong for O_NONBLOCK reads) hung hbench under some
circumstances and other applications may have similar expectations as hbench.
This might also fix port-vax/13333 by Manuel Bowyer.
Other changes to pipe_direct_write() include:
* return short write (and success) on EOF if any data were already read;
we return EPIPE on next write(2) call
* simplify error handling, actually handle uvm_loan() failure correctly,
call pipe_loan_free() on error explicitly and only call uvm_unloan()
if the address space was _not_ already freed by pipe_loan_free()
Thanks Chuck Silvers for uvm_unloan() hints :)
Fallthough to common write in pipe_write() if pipe_direct_write()
returns ENOMEM, otherwise always break out immediatelly.
Use uvm_km_valloc_wait() instead uvm_km_valloc() in pipe_loan_alloc().
table actually match state in NetBSD 0.9 (checked against sys/mount.h
rev. 1.11).
The array is not to be modified from now on, comment updated accordingly.
that fails, just try to recycle a vnode. If we can't allocate or
recycle, issue a warning, sleep a bit, and try the whole thing
again.
This prevents us from blocking forever if we want to use a very large
number of vnodes, but don't have {memory,kva} resources from which to
allocate them.
an spl-protected "interrupt safe map" list, simply require that callers
of uvm_fault() never call us in interrupt context (MD code must make
the assertion), and check for interrupt-safe maps in uvmfault_lookup()
before we lock the map.
has VXLOCK set - it's already being vgoned, most likely by one of our
callers. If we call vgone, we can end up sleeping against ourself
with VXLOCK set - we'll start the race for root.
Pointed out by Love <lha@stacken.kth.se> on tech-kern. Analysis from
Artur Grabowski <art@openbsd.org> via Love.
Should resolve PR kern/13077
is supposed to point directly to struct mbuf or struct sockaddr in kernel
space as appropriate, rather than being a pointer to memory in userland.
This is to be used by compat/* when emulation needs to wrap
send{to|msg}(2)/recv{from|msg}(2) and modify the passed struct
sockaddr.