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.
Details
- Reviewers
jch gnn rwatson - Group Reviewers
transport - Commits
- rS298743: This cleans up the timers code in TCP to start using the new
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
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.
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
@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).
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.