| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
We can simulate the current behavior without lbolt by sleeping for 1
second on the &nowake channel.
ok mpi@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce and use TIMEVAL_TO_NSEC() to convert SO_RCVTIMEO/SO_SNDTIMEO
specified values into nanoseconds. As a side effect it is now possible
to specify a timeout larger that (USHRT_MAX / 100) seconds.
To keep code simple `so_linger' now represents a number of seconds with
0 meaning no timeout or 'infinity'.
Yes, the 0 -> INFSLP API change makes conversions complicated as many
timeout holders are still memset()'d.
Inputs from cheloha@ and bluhm@, ok bluhm@
|
|
|
|
| |
ok jca@
|
|
|
|
|
|
|
|
|
|
| |
does not block the signal. If all threads block the signal, we
delivered it to the main thread. This does not conform to POSIX.
If any thread unblocks the signal, it should be delivered immediately
to this thread.
Mark such signals pending at the process instead of a single thread.
Then any thread can handle it later.
OK kettenis@ guenther@
|
|
|
|
|
|
| |
m_leadingspace() and m_trailingspace(). Convert all callers to call
directly the functions and remove the defines.
OK krw@, mpi@
|
|
|
|
|
|
| |
put the algorithm into a new function m_calchdrlen(). Also set an
uninitialized m_len to 0 in NFS code.
OK claudio@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for sockets is non-blocking.
This allows us to G/C SS_NBIO. Having to keep the two flags in sync
in a mp-safe way is complicated.
This change introduce a behavior change in sosplice(), it can now
always block. However this should not matter much due to the socket
lock being taken beforhand.
ok bluhm@, benno@, visa@
|
|
|
|
|
|
| |
locking.
ok visa@, bluhm@
|
|
|
|
|
|
|
|
| |
invalid. But the compiler cannot know whether it has changed in
the meantime, so in the else case a bunch of variables would not
be initialized. Add a panic() there to change the compiler's
assumptions, the code should not be reached anyway.
found by clang -Wuninitialized; OK deraadt@
|
|
|
|
|
|
|
| |
Finally protect the last `so_rcv' and `so_snd' accesses with the socket
lock.
ok visa@, bluhm@
|
|
|
|
|
|
| |
all the callers to call m_freem(9).
Support from deraadt@ and tedu@, ok visa@, bluhm@
|
|
|
|
|
| |
an if vs the condition itself. weird contortions because of course the
lines want to be like 900 columns wide, but i think it's better now.
|
|
|
|
|
| |
also move checks up sooner to prevent a (root) panic.
ok bluhm
|
|
|
|
| |
Tested by Hrvoje Popovski, ok bluhm@
|
|
|
|
| |
ok phessler@, visa@, bluhm@
|
|
|
|
|
|
|
| |
Protect the fields modifieds by sosetopt() and simplify the dance
with the stars.
ok bluhm@
|
|
|
|
|
|
|
| |
As a side effect, soconnect() and soconnect2() now expect a locked socket,
so update all the callers.
ok bluhm@
|
|
|
|
|
|
| |
While here document an abuse of parent socket's lock.
Problem reported by krw@, analysis and ok bluhm@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
buffers.
This is one step towards unlocking TCP input path. Note that all the
functions asserting for the socket lock are not necessarilly MP-safe.
All the fields of 'struct socket' aren't protected.
Introduce a new kernel-only kqueue hint, NOTE_SUBMIT, to be able to
tell when a filter needs to lock the underlying data structures. Logic
and name taken from NetBSD.
Tested by Hrvoje Popovski.
ok claudio@, bluhm@, mikeb@
|
|
|
|
|
|
|
| |
bugs could easily result in use-after-free or double free. Introduce
m_freemp() which automatically resets the pointer before freeing
it. So we have less dangling pointers in the kernel.
OK krw@ mpi@ claudio@
|
|
|
|
|
|
|
|
|
|
| |
Outside of USB, no code is executed in a softnet interrupt context. So
what's protecting NFS data structures is the KERNEL_LOCK().
But more importantly, since r1.114 of nfs_socket.c, the 'softnet' thread
is no longer executing NFS code.
ok visa@
|
|
|
|
| |
ok bluhm@
|
|
|
|
|
|
|
|
|
| |
Always defere soreceive() to an nfsd(8) process instead of doing it in
the 'softnet' thread. Avoiding this recursion ensure that we do not
introduce a new sleeping point by releasing and grabbing the netlock.
Tested by many, committing now in order to find possible performance
regression.
|
|
|
|
| |
"good work" deraadt@, ok visa@
|
|
|
|
|
|
|
|
|
|
|
| |
of the network stack that are not yet ready to be executed in parallel or
where new sleeping points are not possible.
This first pass replace all the entry points leading to ip_output(). This
is done to not introduce new sleeping points when trying to acquire ART's
write lock, needed when a new L2 entry is created via the RT_RESOLVE.
Inputs from and ok bluhm@, ok dlg@
|
|
|
|
|
|
|
| |
everywhere to avoid passing around pointers to uninitialized stack
memory. While there, fix the call to in6_recoverscope() in
fill_drlist().
OK deraadt@ mpi@
|
|
|
|
| |
ok stsp mpi
|
| |
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
| |
|
| |
|
|
|
|
|
|
|
| |
don't panic, but just return.
tested by nicm@
ok tedu@
|
|
|
|
| |
testing help mpi@
|
|
|
|
| |
MHLEN - max_hdr in that place. OK mikeb@
|
|
|
|
| |
ok bluhm@
|
|
|
|
|
|
|
|
| |
problem has been tracked down. This fixes the sharing of the signal
handling state: shared bits go in sigacts, per-rthread bits goes in
struct proc.
ok deraadt@
|
|
|
|
|
|
| |
until they're zombies and then send them signals (for intr mounts). Until
that is untangled, the sigacts change is unsafe. sthen@ was the victim
for this one
|
|
|
|
|
|
|
|
|
|
|
|
| |
be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves
to struct sigacts, wihle stuff that should be per rthread (ps_oldmask,
SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping
state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread
until our locking around coredumping is better.
Oh, and remove the old SunOS-compat ps_usertramp member.
"I like the sound of this" tedu@
|
|
|
|
|
|
|
|
|
|
|
| |
cannot then re-align it using ALIGN(). That is not portable since we
have architectures where the modulo are quite different. define an
ALIGN_POINTER() macro in place, and use it in one spot.
This caused a NFS crash on sparc (which borrows mbufs and chains them
itself in insane ways). I heard claudio and beck trying to diagnose
it from over the room when suddenly I knew exactly what it was.
blambert spent a few hours on it making sure that I wasn't insane.
|
|
|
|
|
|
|
|
|
| |
are required to detect that.
Change the function to take a wait argument (used in nfs server, but
M_NOWAIT everywhere else for now) and to return an error
ok claudio@ henning@ krw@
|
|
|
|
|
|
| |
no binary change apart from nfsm_reqhead() which is clearly correct.
ok thib@
|
|
|
|
|
|
|
|
|
|
| |
also make the rexmit timeout per nfsmount, and make sure to start/stop the
timer appropriately.
now the nfs_timer() only fires if there is work todo, not always at nfs_ticks
(it did, even if there where no nfsmounts in the system!).
OK blambert@
|
|
|
|
|
|
|
|
|
|
| |
but extensive performance benchmarking done by myself and jasper@
has shown that it doesn't help, at all - even on vaxens and in some
cases it makes things significantly slower.
"this excites me sexually" jetpack@
Tested by jasper@.
OK blambert@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to keep the data munging "state" into an nfsm_info structure. Each
function now has this structure on its stack, and it and its members
are now passed around so that the macros/functions can work there magic.
this will make removing the nfsm_* macros way easier.
Idea/code picked up from DragonflyBSD.
Tested by krw@, jacekm@ and myself.
OK blambert@.
|
|
|
|
|
|
|
|
| |
or wcc data if we have a proper reply.
found the hard way by ariane@, tested by ariane@.
OK blambert@
|
|
|
|
|
|
|
|
| |
lbolt and waking up every second and checking to see if the correct
number of seconds has passed, just calculate the timeout once and
pass that to tsleep().
ok thib@
|
|
|
|
| |
OK blambert@
|
|
|
|
|
|
| |
sense than malloc.
ok thib@, who says the puffin still gets it either way
|
| |
|