Page MenuHomeFreeBSD

Improve layout of struct inpcb
ClosedPublic

Authored by glebius on May 11 2017, 9:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 10:40 PM
Unknown Object (File)
Dec 24 2023, 5:10 PM
Unknown Object (File)
Dec 14 2023, 6:42 AM
Unknown Object (File)
Dec 2 2023, 12:20 PM
Unknown Object (File)
Nov 10 2023, 9:55 PM
Unknown Object (File)
Nov 9 2023, 7:35 AM
Unknown Object (File)
Nov 7 2023, 11:05 AM
Unknown Object (File)
Nov 7 2023, 7:38 AM
Subscribers

Details

Summary
  • Rearrange struct inpcb fields to optimize the TCP output code path considering cache line hits and misses. Put the lock and hash list glue into the first cache line, put inp_refcount inp_flags inp_socket into the second cache line. This has been tested at Netflix.

Diff Detail

Event Timeline

bz requested changes to this revision.May 12 2017, 12:57 PM

Could this please be multiple individual changes.
The function argument change is completely independent of the struct reordering.

If people would want to do alternate performance validation on the struct changes, I'd really like to have just that.

Thanks.

This revision now requires changes to proceed.May 12 2017, 12:57 PM

Yes, this will be two separate commits.

Anybody is welcome to do alternate performance validation. At Netflix we found this layout of the structure optimal.

glebius edited edge metadata.

Reduce to the structure layout change only.

glebius retitled this revision from Tweaks and fixes to the inpcb allocation. to Improve layout of struct inpcb.May 15 2017, 10:03 PM
glebius edited the summary of this revision. (Show Details)

Did the other changes get in already or are they in a different review? I will try to see what this one does in a different setup during the next days (I hope).

The other changes are already in.