* [PATCH net-next] tcp: defer sacked assignment
@ 2016-08-17 14:48 Eric Dumazet
2016-08-17 14:53 ` Neal Cardwell
2016-08-19 6:27 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2016-08-17 14:48 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Neal Cardwell, Yuchung Cheng
From: Eric Dumazet <edumazet@google.com>
While chasing tcp_xmit_retransmit_queue() kasan issue, I found
that we could avoid reading sacked field of skb that we wont send,
possibly removing one cache line miss.
Very minor change in slow path, but why not ? ;)
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/ipv4/tcp_output.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index bdaef7fd6e47701b2d2280e1f40f816e1920c432..8b45794eb6b2600c914e504b8031f61dbbe164a3 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2776,7 +2776,7 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
max_segs = tcp_tso_autosize(sk, tcp_current_mss(sk));
tcp_for_write_queue_from(skb, sk) {
- __u8 sacked = TCP_SKB_CB(skb)->sacked;
+ __u8 sacked;
int segs;
if (skb == tcp_send_head(sk))
@@ -2788,6 +2788,7 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
segs = tp->snd_cwnd - tcp_packets_in_flight(tp);
if (segs <= 0)
return;
+ sacked = TCP_SKB_CB(skb)->sacked;
/* In case tcp_shift_skb_data() have aggregated large skbs,
* we need to make sure not sending too bigs TSO packets
*/
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] tcp: defer sacked assignment
2016-08-17 14:48 [PATCH net-next] tcp: defer sacked assignment Eric Dumazet
@ 2016-08-17 14:53 ` Neal Cardwell
2016-08-19 6:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Neal Cardwell @ 2016-08-17 14:53 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Yuchung Cheng
On Wed, Aug 17, 2016 at 10:48 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> From: Eric Dumazet <edumazet@google.com>
>
> While chasing tcp_xmit_retransmit_queue() kasan issue, I found
> that we could avoid reading sacked field of skb that we wont send,
> possibly removing one cache line miss.
>
> Very minor change in slow path, but why not ? ;)
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
Acked-by: Neal Cardwell <ncardwell@google.com>
neal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] tcp: defer sacked assignment
2016-08-17 14:48 [PATCH net-next] tcp: defer sacked assignment Eric Dumazet
2016-08-17 14:53 ` Neal Cardwell
@ 2016-08-19 6:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-08-19 6:27 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, ncardwell, ycheng
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 17 Aug 2016 07:48:36 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> While chasing tcp_xmit_retransmit_queue() kasan issue, I found
> that we could avoid reading sacked field of skb that we wont send,
> possibly removing one cache line miss.
>
> Very minor change in slow path, but why not ? ;)
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-19 6:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-17 14:48 [PATCH net-next] tcp: defer sacked assignment Eric Dumazet
2016-08-17 14:53 ` Neal Cardwell
2016-08-19 6:27 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).