Page MenuHomeFreeBSD

sockstat(1): use tree(3) rbtree instead of hash
ClosedPublic

Authored by glebius on Jul 6 2022, 9:20 AM.
Tags
None
Referenced Files
F154315458: D35724.id107811.diff
Mon, Apr 27, 7:10 PM
F154313220: D35724.id107860.diff
Mon, Apr 27, 6:51 PM
F154311928: D35724.id107860.diff
Mon, Apr 27, 6:39 PM
Unknown Object (File)
Mon, Apr 27, 2:51 PM
Unknown Object (File)
Sat, Apr 25, 7:50 AM
Unknown Object (File)
Wed, Apr 22, 1:22 PM
Unknown Object (File)
Tue, Apr 21, 11:48 PM
Unknown Object (File)
Mon, Apr 20, 5:02 AM
Subscribers

Details

Summary
  • Use tree to lookup by socket kvaddr. The size of hash is too big for a small virtual machine and at the same time too little for a large production server. A tree would better fit here.
  • Provide a second tree to lookup by pcb kvaddr. These removes full hash traversal when printing every unix(4) socket.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46299
Build 43188: arc lint + arc unit

Event Timeline

tuexen edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jul 6 2022, 9:49 AM

Preserve functionality of printing those pcbs, that don't have a socket.

This revision now requires review to proceed.Jul 6 2022, 8:02 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 7 2022, 5:21 AM
This revision was automatically updated to reflect the committed changes.