Skip to content

libtirpc patches

Doug Nazar linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5svc_dg: Free xp_netid during destroysrc/svc_dg.c+2 -00 replies
2/5svc: Batch allocations of pollfdssrc/svc.c+9 -71 reply
3/5Add destructor functions to cleanup static resources on exitsrc/auth_none.c src/clnt_dg.c src/clnt_vc.c +1 more+57 -00 replies
4/5Add ability to detect if we're on the main thread.src/mt_misc.c tirpc/reentrant.h+18 -01 reply
5/5Use static object on main thread, instead of thread specific data.src/getnetconfig.c src/mt_misc.c+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] libtirpc patches

While running valgrind on various nfs-utils programs, I came across a leak while destroying a svc_dg object.

Second, I noticed that pollfds were being reallocated a dozen times, so added an optimization to batch the allocations.

Third, I added destructor functions to clear up some of the static allocations on exit. This is mainly to help with running valgrind. Not too important, more of an RFC if it's desired.

Forth, I noticed that the comments expected the main thread to use the static variable, instead of thread specific data but wasn't doing that. The last two patches implement that. Also helps with valgrind as TSD is not destroyed on the main thread.

Thanks,
Doug

Doug Nazar (5):
svc_dg: Free xp_netid during destroy
svc: Batch allocations of pollfds
Add destructor functions to cleanup static resources on exit Add ability to detect if we're on the main thread.
Use static object on main thread, instead of thread specific data.

 src/auth_none.c    | 14 ++++++++++++++
 src/clnt_dg.c      | 12 ++++++++++++
 src/clnt_vc.c      | 12 ++++++++++++
 src/getnetconfig.c |  3 +++
 src/mt_misc.c      | 20 ++++++++++++++++++++
 src/svc.c          | 35 ++++++++++++++++++++++++++++-------
 src/svc_dg.c       |  2 ++
 tirpc/reentrant.h  |  1 +
 8 files changed, 92 insertions(+), 7 deletions(-)
Signature · 1 line
2.26.2