1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00
freebsd/sys/rpc
John Baldwin e3ba94d4f3 Don't require the socket lock for sorele().
Previously, sorele() always required the socket lock and dropped the
lock if the released reference was not the last reference.  Many
callers locked the socket lock just before calling sorele() resulting
in a wasted lock/unlock when not dropping the last reference.

Move the previous implementation of sorele() into a new
sorele_locked() function and use it instead of sorele() for various
places in uipc_socket.c that called sorele() while already holding the
socket lock.

The sorele() macro now uses refcount_release_if_not_last() try to drop
the socket reference without locking the socket.  If that shortcut
fails, it locks the socket and calls sorele_locked().

Reviewed by:	kib, markj
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D32741
2021-11-09 10:50:12 -08:00
..
rpcsec_gss rpc: Make function tables const 2021-08-14 11:26:12 -04:00
rpcsec_tls rpc: Make function tables const 2021-08-14 11:26:12 -04:00
auth_none.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
auth_unix.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
auth.h rpc: Make function tables const 2021-08-14 11:26:12 -04:00
authunix_prot.c
clnt_bck.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
clnt_dg.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
clnt_rc.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
clnt_stat.h
clnt_vc.c Don't require the socket lock for sorele(). 2021-11-09 10:50:12 -08:00
clnt.h rpc: Make function tables const 2021-08-14 11:26:12 -04:00
getnetconfig.c
krpc.h nfsv4 client: do the BindConnectionToSession as required 2021-04-11 14:34:57 -07:00
netconfig.h
nettype.h
pmap_prot.h
replay.c
replay.h
rpc_callmsg.c
rpc_com.h
rpc_generic.c
rpc_msg.h
rpc_prot.c
rpc.h
rpcb_clnt.c
rpcb_clnt.h
rpcb_prot.c
rpcb_prot.h
rpcm_subs.h
rpcsec_gss.h
rpcsec_tls.h
svc_auth_unix.c
svc_auth.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
svc_auth.h
svc_dg.c rpc: Make function tables const 2021-08-14 11:26:12 -04:00
svc_generic.c
svc_vc.c Don't require the socket lock for sorele(). 2021-11-09 10:50:12 -08:00
svc.c nfsd: fix a NFSv4.1 Linux client mount stuck in CLOSE_WAIT 2021-04-27 15:32:35 -07:00
svc.h Fix a common typo in source code comments 2021-09-04 12:56:57 +02:00
types.h
xdr.h