diff options
author | David S. Miller <davem@davemloft.net> | 2024-06-10 11:54:19 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-06-10 11:54:19 +0100 |
commit | a9522664c6175c6473b0a42c0aa7c26d6d31d5f3 (patch) | |
tree | 65a7cdf0a2ec301fd35f3ae255c8e40658a98202 /net/ipv4/tcp_minisocks.c | |
parent | 8d466c8f4585afe738a975e493a1b8350e95f168 (diff) | |
parent | f81d0dd2fde35fd1acc30b3f4de6aaf57d514551 (diff) |
Merge branch 'tcp-up-pin-tw-timer'
Florian Westphal says:
====================
net: tcp: un-pin tw timer
Changes since previous iteration:
- Patch 1: update a comment, I copied Erics v7 RvB tag.
- Patch 2: move bh off/on into hashdance_schedule and get rid of
comment mentioning pinned tw timer.
I did not copy Erics RvB tag over from v7 because of the change.
- Patch 3 is unchanged, so I kept Erics RvB tag.
This is v8 of the series where the tw_timer is un-pinned to get rid of
interferences in isolated CPUs setups.
First patch makes necessary preparations, existing code relies on
TIMER_PINNED to avoid races.
Second patch un-pins the TW timer. Could be folded into the first one,
but it might help wrt. bisection.
Third patch is a minor cleanup to move a helper from .h to the only
remaining compilation unit.
Tested with iperf3 and stress-ng socket mode.
====================
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 4c894e540730..bc67f6b9efae 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -345,17 +345,10 @@ void tcp_time_wait(struct sock *sk, int state, int timeo) if (state == TCP_TIME_WAIT) timeo = TCP_TIMEWAIT_LEN; - /* tw_timer is pinned, so we need to make sure BH are disabled - * in following section, otherwise timer handler could run before - * we complete the initialization. - */ - local_bh_disable(); - inet_twsk_schedule(tw, timeo); /* Linkage updates. * Note that access to tw after this point is illegal. */ - inet_twsk_hashdance(tw, sk, net->ipv4.tcp_death_row.hashinfo); - local_bh_enable(); + inet_twsk_hashdance_schedule(tw, sk, net->ipv4.tcp_death_row.hashinfo, timeo); } else { /* Sorry, if we're out of memory, just CLOSE this * socket up. We've got bigger problems than |