Page MenuHomeFreeBSD

inpcb: retire the inpcbinfo list lock
ClosedPublic

Authored by glebius on Mar 19 2026, 7:19 PM.
Tags
None
Referenced Files
F153044293: D55966.id.diff
Sat, Apr 18, 7:49 PM
F152960147: D55966.id.diff
Sat, Apr 18, 8:24 AM
Unknown Object (File)
Fri, Apr 17, 10:18 AM
Unknown Object (File)
Wed, Apr 8, 9:56 AM
Unknown Object (File)
Mon, Apr 6, 10:09 AM
Unknown Object (File)
Mon, Apr 6, 10:07 AM
Unknown Object (File)
Sun, Apr 5, 7:06 PM
Unknown Object (File)
Sat, Mar 28, 12:37 PM

Details

Summary

With the SMR locking of inpcbs the use of this lock reduced down to the
global list and generation number. It was used only on an inpcb creation
and destruction. Use the inpcbinfo hash lock for this purpose.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Probably the lock should be renamed to something more generic, not including "hash"?

Probably the lock should be renamed to something more generic, not including "hash"?

On the next changeset in the stack lock usage is reduced mostly to the hash, as the list of all inpcbs goes away.

pouria added a subscriber: pouria.

The only user of in_pcbremhash() function is now only in_pcbdrop()
should we keep it?
IMHO, since the in_pcbdrop() is small enough, maybe we should expand the in_pcbremhash() and remove it entirely.

The only user of in_pcbremhash() function is now only in_pcbdrop()
should we keep it?
IMHO, since the in_pcbdrop() is small enough, maybe we should expand the in_pcbremhash() and remove it entirely.

I haven't yet shared the entire patch queue. The in_pcbdrop() also goes away together with INP_DROPPED and this state is internalized to TCP. This depends on D56025. Once it is in main, I will rebase my branch and share missing patches.

This revision is now accepted and ready to land.Fri, Apr 3, 1:28 PM
This revision was automatically updated to reflect the committed changes.