Page MenuHomeFreeBSD

TCP Timer cleanup.
ClosedPublic

Authored by rrs on Apr 12 2016, 12:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 28 2024, 10:51 AM
Unknown Object (File)
Feb 28 2024, 9:01 AM
Unknown Object (File)
Dec 28 2023, 3:48 PM
Unknown Object (File)
Dec 24 2023, 7:47 PM
Unknown Object (File)
Dec 20 2023, 2:14 AM
Unknown Object (File)
Oct 11 2023, 10:58 PM
Unknown Object (File)
Aug 5 2023, 12:23 AM
Unknown Object (File)
Aug 5 2023, 12:22 AM
Subscribers

Details

Summary

The TCP timer cleanup as been a bit of a mess and kludge for quite some time. The workaround in
place was to start another timer if could not stop a timer. With the advent of callout_async_drain() this
work around is no longer needed. Instead we can cleanly stop a timer and if it can't be stopped (or
more than one can't be stopped) we can let the async drain functionality of the timer system
call back to us until the number of pending async drains is zero then cleanup the timeouts.

Test Plan

I plan on running this on a number of netflix caches. It would also be helpful to
get Verisign to try it out as well since they have a *lot* more connections per
second then NF does.

Diff Detail

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

Event Timeline

rrs retitled this revision from to TCP Timer cleanup..
rrs updated this object.
rrs edited the test plan for this revision. (Show Details)
rrs added reviewers: rwatson, transport, gnn.
jch added a subscriber: jch.

Nice to see callout_async_drain() in action, TCP timer code being (much) cleaner. Will review this change, and run our usual TCP torture tests on it.

gnn edited edge metadata.
This revision is now accepted and ready to land.Apr 13 2016, 12:29 AM

As a testing update to this, I have this running in a netflix storage cache last
night. I did add a netstats counter in addition to this whenever we incremented
the async-drain counter (tt_draincnt)

the machine shows right now in the middle of the night:

c015.ord001.dev# netstat -p tcp -s -s | grep async
285353 occurances where we did async drain

and its still up and clucking.. I will drain it down tomorrow in the early hours
and make sure I have no stray PCB's laying around either.

So it looks like its working :-)

jch: Thanks for running your torture tests.. I did not take out the flags you added though I
am not sure we need them anymore.. what do you think?

Thanks

R

In D5924#126467, @rrs wrote:

jch: Thanks for running your torture tests.. I did not take out the flags you added though I
am not sure we need them anymore.. what do you think?

@rrs : Right, all these flags:

#define TT_DELACK_RST	0x0100
#define TT_REXMT_RST	0x0200
#define TT_PERSIST_RST	0x0400
#define TT_KEEP_RST	0x0800
#define TT_2MSL_RST	0x1000

are not needed anymore. There were added just because callout_async_drain() was missing at that time.

I starting testing this callout_async_drain() usage and so far so good. Let me upgrade our lab to a more recent revision of -CURRENT and I will report my findings here (should be by the end of this week).

jch accepted this revision.EditedApr 25 2016, 5:40 AM
jch edited edge metadata.

Tested on top of -CURRENT r298539 and all good. Performance are the same with and without this patch (this is expected). Green light from me.

Just take the opportunity to also remove the TT_*_RST flags at same time.

This revision was automatically updated to reflect the committed changes.