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)
Fri, Dec 13, 2:28 PM
Unknown Object (File)
Nov 2 2024, 5:48 AM
Unknown Object (File)
Oct 29 2024, 8:15 PM
Unknown Object (File)
Oct 5 2024, 11:54 AM
Unknown Object (File)
Oct 5 2024, 4:55 AM
Unknown Object (File)
Oct 4 2024, 12:19 PM
Unknown Object (File)
Oct 2 2024, 6:58 AM
Unknown Object (File)
Oct 1 2024, 9:11 PM
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.