Page MenuHomeFreeBSD

Optimize the TSO and copy paths to use the new tcp_m_copy routine
ClosedPublic

Authored by rrs on Jun 20 2018, 8:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 9, 8:53 PM
Unknown Object (File)
Mar 11 2024, 1:43 AM
Unknown Object (File)
Dec 22 2023, 11:19 PM
Unknown Object (File)
Nov 10 2023, 9:24 AM
Unknown Object (File)
Nov 8 2023, 9:24 AM
Unknown Object (File)
Nov 1 2023, 12:01 AM
Unknown Object (File)
Oct 31 2023, 7:27 PM
Unknown Object (File)
Sep 30 2023, 12:05 AM
Subscribers

Details

Summary

The TCP stack currently runs through the list of mbufs sizing
for TSO and then again for the actual copy out to the new
mbuf chain being passed down to IP. This causes double the
number of cache hits as we walk the mbuf chains.

For Rack a new tcp_m_copy() module was introduced that
optimizes this so the copy does both copy and size limiting
for TSO at the same time.

This change brings the use of that function into the main stack. Note
that NF has been using this in both rack and the main stack for a couple
of years now. This also paves the way for Drew Gallatin's new mbufs and
the TLS sendfile feature that uses those.

Test Plan

Bring it all up, which I have, and do some tcp connections
and network activity to make sure the stack works.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

gallatin added a reviewer: hselasky.

I added Hans since it is mostly his code we are factoring out.

kbowling added a subscriber: kbowling.

I've deployed a variant of this widely at LLNW on the default stack as well. I think you can garbage collect sbsndptr() from the tree.

This revision is now accepted and ready to land.Jun 20 2018, 8:50 PM

I've deployed a variant of this widely at LLNW on the default stack as well. I think you can garbage collect sbsndptr() from the tree.

The cxgbe TOE stuff uses it

This revision was automatically updated to reflect the committed changes.