Age | Commit message (Collapse) | Author |
|
ok deraadt bluhm
|
|
Only pfkeyv2_send() needs the NET_LOCK() so grab it at the start and release
at the end. This should allow to push the locks down in other places.
OK mpi@, bluhm@
|
|
safe since we're always holding the KERNEL_LOCK() but we want to move
away from that.
Suggested by and ok bluhm@
|
|
Recursions are still marked as XXXSMP.
ok deraadt@, bluhm@
|
|
ok guenther
|
|
For the moment the NET_LOCK() is always taken by threads running under
KERNEL_LOCK(). That means it doesn't buy us anything except a possible
deadlock that we did not spot. So make sure this doesn't happen, we'll
have plenty of time in the next release cycle to stress test it.
ok visa@
|
|
Attach is quite a different thing to the other PRU functions and
this should make locking a bit simpler. This also removes the ugly
hack on how proto was passed to the attach function.
OK bluhm@ and mpi@ on a previous version
|
|
The only function that need the lock is rtm_output() as it messes with
the routing table. So grab the lock there since it is safe to sleep
in a process context.
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.
|
|
unix domain sockets.
This should prevent the multiple deadlock related to unix domain sockets.
Inputs from millert@ and bluhm@, ok bluhm@
|
|
the netlock held. This also changes the prototypes of the *ctloutput
functions to take an mbuf instead of an mbuf pointer.
help, guidance from bluhm@ and mpi@
ok bluhm@
|
|
passing is checked. As the data type has changed in unp_internalize(),
the calculation has to be adapted in sosend().
Found by relayd regress test on i386.
OK millert@
|
|
necessary to lock code that initializes a new socket structure
before it has been linked to any global list.
OK mpi@
|
|
the TASKQ_CANTSLEEP flag is no longer valid for the splicing thread.
OK mikeb@
|
|
Recursions are currently known and marked a XXXSMP.
Please report any assert to bugs@
|
|
splsoftnet()/splx() until the known issues are fixed.
In other words, stop using a rwlock since it creates a deadlock when
chrome is used.
Issue reported by Dimitris Papastamos and kettenis@
ok visa@
|
|
ok rzalamena@, bluhm@
|
|
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@
|
|
NULL tests.
ok mpi@
|
|
reduced buffer size. If the send buffer size is less than the size
of a single mbuf, it will never fit. So if the send buffer is
empty, split the large mbuf and move only a part.
OK claudio@
|
|
This will allow us to keep locking simple as soon as we trade
splsoftnet() for a rwlock.
ok bluhm@
|
|
This will allow us to keep locking simple as soon as we trade
splsoftnet() for a rwlock.
ok bluhm@, claudio@
|
|
splnet() was necessary when link state changes were executed from
hardware interrupt handlers, nowdays all the changes are serialized
by the KERNEL_LOCK() so assert that it is held instead.
ok mikeb@
|
|
splsoftnet() if the function does a splsoftassert(IPL_SOFTNET)
anyway.
|
|
From mpi@'s netlock diff; OK mikeb@
|
|
we enter networking code. Fixes an splassert() found by David Hill.
OK mikeb@
|
|
places for the upcoming network lock. This might trigger some
asserts, but we have to find the missing code paths.
OK mpi@
|
|
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
|
|
This is not an issue right now, but it will become one when an non
recursive lock will be used.
ok claudio@
|
|
fallback.
OK claudio@
|
|
ok mikeb bluhm claudio
|
|
as its own task thread. This is inspired by userland copy where a
process also has to go through the scheduler. This gives the socket
buffer a chance to be filled up and tcp_output() is called less
often and with bigger chunks.
When two kernel tasks share all the workload, the current scheduler
implementation will hang userland processes on single cpu machines.
As a workaround put a yield() into the splicing thread after each
task execution. This reduces the number of calls of tcp_output()
even more.
OK tedu@ mpi@
|
|
bring back the behaviour of rev 1.72. Although allocating small
mbufs when allocating an mbuf cluster fails seems suboptimal, this
should not be changed as a side effect when introducing m_getuio().
OK claudio@
|
|
MCLGETI and large mbuf clusters. This should speed up local connections
a fair bit. OK dlg@ and bluhm@ (after reverting the M_WAIT change on the
cluster allocation)
|
|
After writing data into this loop, it was spinning forever causing
a kernel hang. Detect the loop by counting how often the same mbuf
is spliced. If that happens 128 times, assume that there is a loop
and abort the splicing with ELOOP.
Bug found by tedu@; OK tedu@ millert@ benno@
|
|
|
|
ok beck@ deraadt@
|
|
the socket type and dlg@ is interested in the pointers for ddb show
socket.
OK deraadt@ dlg@
|
|
|
|
should help inspecting socket issues in the future.
enthusiasm from mpi@ bluhm@ deraadt@
|
|
and somove() panic messages.
OK phessler@ benno@ deraadt@ mpi@
|
|
min()+uiomovei() to ulmin()+uiomove() and re-arranging space computations
in sosend(). The soreceive() part was also reported by Martin Natano.
ok bluhm@ and also discussed with tedu@
|
|
|
|
pf part. This allows to reuse this function in socket splicing.
Reset the mbuf flags that are related to the packet header, but
preserve the data flags.
pair(4) tested by reyk@; sosplice(9) tested by bluhm@; OK mikeb@ reyk@
|
|
in soft interrupt. So the pool needs an IPL_SOFTNET protection.
This fixes a panic: mtx_enter: locking against myself.
While there, call pool_setipl() also for socket_pool. Although
this pool uses explicit spl protection around pool_get() and
pool_put(), it is better to specify the IPL it is operating on.
OK mpi@ mikeb@
|
|
ok bluhm@, claudio@, dlg@
|
|
compatibility with 4.3BSD in September 1989.
*Pick your own definition for "temporary".
ok bluhm@, claudio@, dlg@
|
|
receiving interface in the packet header of every mbuf.
The interface pointer should now be retrieved when necessary with
if_get(). If a NULL pointer is returned by if_get(), the interface
has probably been destroy/removed and the mbuf should be freed.
Such mechanism will simplify garbage collection of mbufs and limit
problems with dangling ifp pointers.
Tested by jmatthew@ and krw@, discussed with many.
ok mikeb@, bluhm@, dlg@
|
|
Diff from Vitaliy Makkoveev.
Manpage tweak and ok millert@
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|