Page MenuHomeFreeBSD

cc (Cheng Cui)
User

Projects

User Details

User Since
Nov 23 2015, 12:29 AM (469 w, 3 d)

Recent Activity

Tue, Nov 19

cc added a comment to D47474: tcp: Use segment size excluding any options for all cwnd calculations.

update:
Looks this patch has some significant reduction on fragment (data_size % MSS) > 0 out of TSO data chunks: testD47474

Tue, Nov 19, 4:17 PM

Thu, Nov 14

cc added a comment to D47474: tcp: Use segment size excluding any options for all cwnd calculations.

Well, I had the same thought - the full MSS (including options) is less frequently used, that the mss without options...

So, it would certainly be more efficient to store the MSS exkluding options in tcpcb, and calculating the MSS inkl. option space only where that is needed...

But that should a different Diff IMHO, as this one is more in the break/fix category.

Thu, Nov 14, 4:36 PM
cc added inline comments to D47474: tcp: Use segment size excluding any options for all cwnd calculations.
Thu, Nov 14, 4:09 PM

Mon, Nov 4

cc accepted D47439: tcp: consistently set CWND to MSS in case of SYN/SYN ACK retransmissions.

I think you meant the title be:
tcp: consistently set CWND to MSS => tcp: consistently set CWND to 1
in case of SYN/SYN ACK retransmissions => in case of SYN retransmissions

Mon, Nov 4, 8:59 PM

Mon, Oct 28

cc accepted D43470: tcp: refactor cwnd during SACK transmissions and enable TSO.

OK. I am approving it now as my test in https://wiki.freebsd.org/chengcui/testD43470 shows some improvement. Any bug related observations can be fixed later.

Mon, Oct 28, 3:42 PM

Thu, Oct 24

cc added a comment to D47056: tcp: allow TSO even while RX path is unordered.

Also, please correct the SUMMARY section:

Thu, Oct 24, 7:21 PM

Wed, Oct 23

cc added a comment to D30155: ixgbe: Bring back accounting for tx in AIM.
In D30155#1075233, @cc wrote:

From my test result in testD30155, I didn't find any significant improvement under my eyes:

  • no significant difference in ping latency
  • no significant iperf3 performance improvement due to bad performance (3.x Gbps) in FreeBSD 15-current vs. (9.x Gbps) in stock Linux kernel 5.15.

Thanks for the results @cc. Something seems very strange with the throughput there, the main system I am testing is a xeon-d that is much less than 1/4th as powerful and can line rate both directions no issues and I also have an older 2x Xeon E5-2695 v2 (two NUMA domains) without throughput limitations. I will see if I can find my emulab credentials and take a look there, it seems like these might be 4-way NUMA machines but it is not expected to me that that would cause this magnitude of throughput issues, especially at the 10gbit data rate.

Wed, Oct 23, 7:18 PM

Tue, Oct 22

cc removed a reviewer for D4295: Add driver backpressure: cc.
Tue, Oct 22, 8:06 PM · transport
cc added a reviewer for D4295: Add driver backpressure: cc.
Tue, Oct 22, 8:05 PM · transport

Oct 21 2024

cc requested review of D47218: tcp cc: re-organize newreno functions into parts that can be re-used.
Oct 21 2024, 2:33 PM
cc requested review of D47213: cc_cubic: use newreno to emulate AIMD in TCP-friendly region.
Oct 21 2024, 11:12 AM

Oct 17 2024

cc updated the summary of D47130: tcp: remove the `goto drop` label by reusing equivalences in tcp_do_segment()..
Oct 17 2024, 10:17 PM
cc updated the diff for D47130: tcp: remove the `goto drop` label by reusing equivalences in tcp_do_segment()..

update code based on discussion

Oct 17 2024, 7:39 PM
cc added a comment to D30155: ixgbe: Bring back accounting for tx in AIM.

From my test result in testD30155, I didn't find any significant improvement under my eyes:

Oct 17 2024, 2:05 PM

Oct 16 2024

cc added a comment to D43470: tcp: refactor cwnd during SACK transmissions and enable TSO.

Better now. But it can be cleaner.

Oct 16 2024, 10:40 PM
cc added inline comments to D43470: tcp: refactor cwnd during SACK transmissions and enable TSO.
Oct 16 2024, 2:33 PM
cc added inline comments to D47130: tcp: remove the `goto drop` label by reusing equivalences in tcp_do_segment()..
Oct 16 2024, 12:31 PM
cc updated the diff for D47130: tcp: remove the `goto drop` label by reusing equivalences in tcp_do_segment()..

Add the __inline keyword to avoid overhead when possible.

Oct 16 2024, 12:27 PM

Oct 15 2024

cc added inline comments to D43470: tcp: refactor cwnd during SACK transmissions and enable TSO.
Oct 15 2024, 8:27 PM
cc requested review of D47130: tcp: remove the `goto drop` label by reusing equivalences in tcp_do_segment()..
Oct 15 2024, 5:07 PM
cc added a comment to D47106: add TH_AE capabilities to ppp and pf.

My current concern is that the definition and the usage of the super set macro TH_FLAGS or TCPF_ALL are inconsistent. For example, TH_ECE is in TH_FLAGS, but TH_ECN is in TCPF_ALL.

Oct 15 2024, 1:15 PM
cc added a comment to D30155: ixgbe: Bring back accounting for tx in AIM.

Ok this is a bit messy code and comment wise but I have the new algorithm working in what I believe to be the correct way with some bug fixes versus the origin and would like some data to see how to proceed before tidying everything up.
@cc it looks like emulab has ix(4) on d820s nodes, would you be willing to take a look at these 3 options similar to the e1000 test?

  • Default in HEAD/STABLE: sysctl dev.ix.<N>.enable_aim=0
  • New algorithm (on by default with this patch) sysctl dev.ix.<N>.enable_aim=1
  • Old algorithm (FreeBSD <10) sysctl dev.ix.<N>.enable_aim=2
Oct 15 2024, 11:41 AM

Oct 14 2024

cc added inline comments to D47106: add TH_AE capabilities to ppp and pf.
Oct 14 2024, 3:36 PM
cc accepted D47063: extend the use of the th_flags accessor function.
Oct 14 2024, 3:08 PM
cc requested changes to D47063: extend the use of the th_flags accessor function.

I current concern is that new code for the TH_AE shall be in a separate patch, so that this patch can be a pure big non-functional change.

Oct 14 2024, 1:02 PM

Oct 11 2024

cc added inline comments to D43470: tcp: refactor cwnd during SACK transmissions and enable TSO.
Oct 11 2024, 1:48 PM
cc requested changes to D43470: tcp: refactor cwnd during SACK transmissions and enable TSO.

Need code update.

Oct 11 2024, 12:46 PM
cc added a comment to D43470: tcp: refactor cwnd during SACK transmissions and enable TSO.

Because of commit 440f4ba18e3a, please re-base.

Oct 11 2024, 12:45 PM

Oct 10 2024

cc added a comment to D43355: tcp: fix erroneous transmission selection after RTO w/ SACK incoming.

By the way based on my test, I didn't find this statement In addition, cwnd used to be 1 MSS right after RTO, increasing to 2 MSS more recently. to be true in your SUMMARY section. Also Address this by setting up snd_recover just in cc_cong_signal. needs to be revised.

Oct 10 2024, 3:37 PM
cc accepted D43355: tcp: fix erroneous transmission selection after RTO w/ SACK incoming.

With the provided packetdrill scripts before/after the fix, my test result is in my wiki: testD43355.

Oct 10 2024, 3:19 PM

Oct 9 2024

cc added inline comments to D43355: tcp: fix erroneous transmission selection after RTO w/ SACK incoming.
Oct 9 2024, 10:33 PM
cc added inline comments to D43355: tcp: fix erroneous transmission selection after RTO w/ SACK incoming.
Oct 9 2024, 7:40 PM
cc accepted D46768: e1000: Re-add AIM.

I have no problem with this patch after testing it in Emulab. The test result is in my above comment.

Oct 9 2024, 3:56 PM
cc added a comment to D46768: e1000: Re-add AIM.

If I recall these machines are Pentium 4 era and pretty CPU constrained. You can try the tunable 'hw.em.unsupported_tso=1' and then enable TSO on the interface to get some more bulk bandwidth, they are stable with TSO.

Are you able to detect any improvements or regressions otherwise? ping-pong time at low packet rate between two systems both set with enable_aim=0,1,2 would be interesting.

Oct 9 2024, 1:34 PM

Oct 2 2024

cc added a comment to D46768: e1000: Re-add AIM.
In D46768#1069015, @cc wrote:

@cc this code works well in my testing. There are now some quality of life improvements, at runtime you can now switch in the middle of a test. I run a tmux session with three splits, one of systat -vmsat, one of the benchmark (iperf3 or whatever), and one to either toggle sysctl dev.{em,igb}.<interface number>.enable_aim=<N> where <N> description which follows. You can also do something like sysctl dev.igb.0 | grep _rate to see the current queue values.

Existing static 8000 int/s behavior (how the driver is in main):

sysctl dev.igb.0.enable_aim=0

Suggested new default, you will boot in this mode with this patch:

sysctl dev.igb.0.enable_aim=1

Low latency option of above algorithm (up to 70k ints/s):

sysctl dev.igb.0.enable_aim=2

ixl(4) algorithm bodged in that would need to be cleaned up:

sysctl dev.igb.0.enable_aim=3

I would be curious to know what you find with these different options in an array of testing and I will use the results to ready this for actual use.

I didn't find any rate change by the sysctl. Please let me know if the hardware does not support this new change.

root@s1:~ # sysctl dev.em.2.enable_aim=0
dev.em.2.enable_aim: 0 -> 0
root@s1:~ # sysctl dev.em.2 | grep _rate
dev.em.2.queue_rx_0.interrupt_rate: 20032
dev.em.2.queue_tx_0.interrupt_rate: 20032
root@s1:~ # sysctl dev.em.2.enable_aim=1
dev.em.2.enable_aim: 0 -> 1
root@s1:~ # sysctl dev.em.2 | grep _rate
dev.em.2.queue_rx_0.interrupt_rate: 20032
dev.em.2.queue_tx_0.interrupt_rate: 20032
root@s1:~ # sysctl dev.em.2.enable_aim=2
dev.em.2.enable_aim: 1 -> 2
root@s1:~ # sysctl dev.em.2 | grep _rate
dev.em.2.queue_rx_0.interrupt_rate: 20032
dev.em.2.queue_tx_0.interrupt_rate: 20032
root@s1:~ #

This looks to me like it is working, the algorithm is dynamic and 20k would be latency reducing idle queue. At enable_aim=0, you would see 8000. 20k looks right for an idle queue, what happens if you place a bulk load through it like iperf3? It should drop down to 4k.

Oct 2 2024, 8:34 PM
cc added a comment to D46824: tcp_output: Clear FIN if tcp_m_copym truncates output length.
In D46824#1068981, @jhb wrote:

I can fix the type mismatch during commit. I have not looked to see if other stacks are affected.

Fixing the type mismatch would be good. I think other stacks are not affected, since I think they
do not send a FIN before any outstanding data is ACKed and nothing is buffered anymore.

Oct 2 2024, 7:58 PM
cc added a comment to D46768: e1000: Re-add AIM.

@cc this code works well in my testing. There are now some quality of life improvements, at runtime you can now switch in the middle of a test. I run a tmux session with three splits, one of systat -vmsat, one of the benchmark (iperf3 or whatever), and one to either toggle sysctl dev.{em,igb}.<interface number>.enable_aim=<N> where <N> description which follows. You can also do something like sysctl dev.igb.0 | grep _rate to see the current queue values.

Existing static 8000 int/s behavior (how the driver is in main):

sysctl dev.igb.0.enable_aim=0

Suggested new default, you will boot in this mode with this patch:

sysctl dev.igb.0.enable_aim=1

Low latency option of above algorithm (up to 70k ints/s):

sysctl dev.igb.0.enable_aim=2

ixl(4) algorithm bodged in that would need to be cleaned up:

sysctl dev.igb.0.enable_aim=3

I would be curious to know what you find with these different options in an array of testing and I will use the results to ready this for actual use.

Oct 2 2024, 7:38 PM

Oct 1 2024

cc added a comment to D46824: tcp_output: Clear FIN if tcp_m_copym truncates output length.

I think this change also applies to the bbr and rack stacks.

Oct 1 2024, 2:03 PM
cc requested changes to D46824: tcp_output: Clear FIN if tcp_m_copym truncates output length.
Oct 1 2024, 1:57 PM
cc accepted D46850: tcp: small cleanup.

Looks good to me. Thanks for removing the goto label skip_alloc that improves reading.

Oct 1 2024, 1:42 PM

Sep 27 2024

cc accepted D46793: tcp: improve ref count handling when processing SYN.
In D46793#1067415, @cc wrote:

Does the summary section need to be updated? I didn't find the mentioned leaking part in code. Or am I missing something?

Sep 27 2024, 8:50 PM
cc added a comment to D46793: tcp: improve ref count handling when processing SYN.

Does the summary section need to be updated? I didn't find the mentioned leaking part in code. Or am I missing something?

Sep 27 2024, 6:55 PM
cc added a comment to D46768: e1000: Re-add AIM.

Rebase on main and some small improvements and bug fixes. Upon more testing the reimported algorithm is tuned for igb and less governed than intended on lem/em due to a different unit of measure on the ITR register. Need to think a little on how I would like to handle that.

Sep 27 2024, 1:31 PM

Sep 24 2024

cc added a comment to D46768: e1000: Re-add AIM.

Thanks for adding me as one of the reviewers. I will look at this patch and more likely test it in one of the machines in Emulab.

Sep 24 2024, 9:36 PM

Sep 17 2024

cc committed rGee4506105171: cc_cubic: use newreno to emulate AIMD in TCP-friendly region (authored by cc).
cc_cubic: use newreno to emulate AIMD in TCP-friendly region
Sep 17 2024, 2:38 PM
cc closed D46546: cc_cubic: use newreno to emulate AIMD in TCP-friendly region.
Sep 17 2024, 2:37 PM
cc updated the diff for D46546: cc_cubic: use newreno to emulate AIMD in TCP-friendly region.

re-base

Sep 17 2024, 2:08 PM
cc updated the diff for D46546: cc_cubic: use newreno to emulate AIMD in TCP-friendly region.

re-base after commit b6c137de0af1

Sep 17 2024, 2:04 PM
cc committed rGb6c137de0af1: tcp cc: re-organize newreno functions into parts that can be re-used (authored by cc).
tcp cc: re-organize newreno functions into parts that can be re-used
Sep 17 2024, 1:59 PM
cc closed D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Sep 17 2024, 1:58 PM
cc updated the diff for D46046: tcp cc: re-organize newreno functions into parts that can be re-used.

update function names based on Michael's suggestion

Sep 17 2024, 1:46 PM

Sep 5 2024

cc retitled D46046: tcp cc: re-organize newreno functions into parts that can be re-used from cc_cubic: use newreno to emulate AIMD in TCP-friendly region to tcp cc: re-organize newreno functions into parts that can be re-used.
Sep 5 2024, 7:10 PM
cc updated the diff for D46046: tcp cc: re-organize newreno functions into parts that can be re-used.

split this patch into two parts: this patch and D46546

Sep 5 2024, 7:06 PM
cc updated the summary of D46546: cc_cubic: use newreno to emulate AIMD in TCP-friendly region.
Sep 5 2024, 6:58 PM
cc requested review of D46546: cc_cubic: use newreno to emulate AIMD in TCP-friendly region.
Sep 5 2024, 6:56 PM
cc updated the diff for D46046: tcp cc: re-organize newreno functions into parts that can be re-used.

re-base

Sep 5 2024, 6:34 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Sep 5 2024, 6:26 PM

Sep 4 2024

cc accepted D46428: tcp: improve consistency of syncache_respond() failure handling.
Sep 4 2024, 11:47 PM
cc accepted D46428: tcp: improve consistency of syncache_respond() failure handling.

Besides, I am wondering if TCPSTAT_INC(tcps_sndacks) and TCPSTAT_INC(tcps_sndtotal) consistency can also be improved after successful syncache_respond().

Sep 4 2024, 7:20 PM

Sep 3 2024

cc added a comment to D43355: tcp: fix erroneous transmission selection after RTO w/ SACK incoming.

Your summary section claims "In addition, cwnd used to be 1 MSS right after RTO, increasing to 2 MSS more recently." But I could not find the code change where cwnd is changed to 2MSS after RTO. Please elaborate if the summary needs to be revised or I am missing the point.

Sep 3 2024, 6:32 PM

Aug 26 2024

cc accepted D46437: tcpsso: remove support for some IPPROTO_TCP-level socket option names.
Aug 26 2024, 7:40 PM
cc added a comment to D46437: tcpsso: remove support for some IPPROTO_TCP-level socket option names.

Are you planning to remove the corresponding code in kernel space in a separate patch?

Aug 26 2024, 1:49 PM
cc accepted D46427: tcp rack, bbr: improve handling of soft errors.
Aug 26 2024, 12:46 PM

Aug 22 2024

cc accepted D46408: tcp: fix format of sysctl-variable.

reference in SYSCTL(9)

Aug 22 2024, 12:42 PM

Aug 15 2024

cc committed rG8cc528c682d7: tcp cc: clean up some un-used cc_var flags (authored by cc).
tcp cc: clean up some un-used cc_var flags
Aug 15 2024, 1:35 PM
cc closed D46299: tcp cc: clean up some un-used cc_var flags.
Aug 15 2024, 1:35 PM

Aug 14 2024

cc requested review of D46299: tcp cc: clean up some un-used cc_var flags.
Aug 14 2024, 7:32 PM

Aug 11 2024

cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 11 2024, 8:06 PM

Aug 10 2024

cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 10 2024, 2:20 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 10 2024, 2:20 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 10 2024, 2:14 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 10 2024, 1:56 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 10 2024, 1:55 PM

Aug 8 2024

cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 8 2024, 6:49 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 8 2024, 5:45 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 8 2024, 2:37 PM
cc updated the test plan for D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 8 2024, 2:35 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 8 2024, 2:34 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Aug 8 2024, 2:34 PM

Aug 7 2024

cc accepted D46240: tcp: minor cleanup.
Aug 7 2024, 3:51 PM
cc accepted D46068: rack, bbr: cleanup ack throttling.
Aug 7 2024, 3:42 PM

Aug 6 2024

cc accepted D46222: ddb: update printing of t_flags and tflags2.
Aug 6 2024, 4:52 PM

Jul 29 2024

cc accepted D46143: tcp: inherit CC algorithm from listener.

Thought for a while if these new lines can be wrapped into a new function like try_cc_attach_from_listener(), but it looks to be unnecessary.

Jul 29 2024, 2:51 PM
cc accepted D46141: tcp: retire sysctl variable functions_inherit_listen_socket_stack.

LGTM.
I think for those who want newly accepted connections to use a "new" default stack, there is a mechanism using tcpsso that could be used to (attempt to) change the listening socket's stack so that new connections use that stack. This would need to be run for all desired listening sockets though.

Jul 29 2024, 2:12 PM

Jul 26 2024

cc added a comment to D46141: tcp: retire sysctl variable functions_inherit_listen_socket_stack.

This change seems to revert the commit 6134aabe38c8. Is there any behavior change on V_functions_inherit_listen_socket_stack == 0 after this change? Is the TCP function block from the listener changed dynamically once the default stack is changed?

Jul 26 2024, 4:19 PM
cc accepted D46140: tcp: make sysctl variables ack_war_timewindow and ack_war_cnt vnet specific.

ship after update

Jul 26 2024, 3:29 PM
cc accepted D46142: cc: remove non-working sctp support.

Looks good to me, after the comment update for struct cc_var.

Jul 26 2024, 2:31 PM

Jul 25 2024

cc committed rG9565854ab408: cc_cubic: remove the redundant variable num_cong_events from struct cubic. (authored by cc).
cc_cubic: remove the redundant variable num_cong_events from struct cubic.
Jul 25 2024, 5:14 PM
cc closed D46042: cc_cubic: remove the redundant variable num_cong_events from struct cubic..
Jul 25 2024, 5:14 PM
cc added a comment to D46066: tcp: implement throttling of challenge ACKs.
In D46066#1050919, @cc wrote:

Just saw https://reviews.freebsd.org/D46068. If this patch has not been committed, we can still further revise it, so that D46068 can be cleaner on function re-use.

I think the logic here can be split into two functions, such that the refined logic 1 on checking if we should send ACK can be re-used across multiple places.

logic 1:

bool
is_ack_unlimited(struct tcpcb *tp)
{
    /* focus on checking the epoch and
     * if should send ACK, return true; else return false
     */ 
}

logic 2:

void
tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m)
{
    if (is_ack_unlimited(tp)) {.
       tcp_respond();
    ....
    }
}

I don't get the point. Eventually, all places should use tcp_send_challenge_ack(), I think. But that is multiple commits away.

Jul 25 2024, 2:03 PM

Jul 24 2024

cc requested changes to D46068: rack, bbr: cleanup ack throttling.
Jul 24 2024, 6:44 PM
cc added a comment to D46066: tcp: implement throttling of challenge ACKs.

Just saw https://reviews.freebsd.org/D46068. If this patch has not been committed, we can still further revise it, so that D46068 can be cleaner on function re-use.

Jul 24 2024, 6:43 PM
cc added a reviewer for D46046: tcp cc: re-organize newreno functions into parts that can be re-used: transport.
Jul 24 2024, 4:23 PM
cc updated the test plan for D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Jul 24 2024, 4:23 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Jul 24 2024, 2:07 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Jul 24 2024, 2:04 PM
cc updated the summary of D46046: tcp cc: re-organize newreno functions into parts that can be re-used.
Jul 24 2024, 2:03 PM
cc added inline comments to D46066: tcp: implement throttling of challenge ACKs.
Jul 24 2024, 1:53 PM
cc accepted D46066: tcp: implement throttling of challenge ACKs.
Jul 24 2024, 1:24 PM

Jul 23 2024

cc added inline comments to D46066: tcp: implement throttling of challenge ACKs.
Jul 23 2024, 7:58 PM