linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/3] rxrpc: Performance drop fix and other fixes
@ 2020-06-18  7:50 David Howells
  2020-06-18  7:50 ` [PATCH net 1/3] rxrpc: Fix trace string David Howells
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: David Howells @ 2020-06-18  7:50 UTC (permalink / raw)
  To: netdev; +Cc: dhowells, linux-afs, linux-kernel


Here are three fixes for rxrpc:

 (1) Fix a trace symbol mapping.  It doesn't seem to let you map to "".

 (2) Fix the handling of the remote receive window size when it increases
     beyond the size we can support for our transmit window.

 (3) Fix a performance drop caused by retransmitted packets being
     accidentally marked as already ACK'd.

The patches are tagged here:

	git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
	rxrpc-fixes-20200618

and can also be found on the following branch:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-fixes

David
---
David Howells (1):
      rxrpc: Fix afs large storage transmission performance drop


 include/trace/events/rxrpc.h | 2 +-
 net/rxrpc/call_event.c       | 2 +-
 net/rxrpc/input.c            | 7 +++----
 3 files changed, 5 insertions(+), 6 deletions(-)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net 1/3] rxrpc: Fix trace string
  2020-06-18  7:50 [PATCH net 0/3] rxrpc: Performance drop fix and other fixes David Howells
@ 2020-06-18  7:50 ` David Howells
  2020-06-18  7:50 ` [PATCH net 2/3] rxrpc: Fix handling of rwind from an ACK packet David Howells
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: David Howells @ 2020-06-18  7:50 UTC (permalink / raw)
  To: netdev; +Cc: dhowells, linux-afs, linux-kernel

The trace symbol printer (__print_symbolic()) ignores symbols that map to
an empty string and prints the hex value instead.

Fix the symbol for rxrpc_cong_no_change to " -" instead of "" to avoid
this.

Fixes: b54a134a7de4 ("rxrpc: Fix handling of enums-to-string translation in tracing")
Signed-off-by: David Howells <dhowells@redhat.com>
---

 include/trace/events/rxrpc.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h
index ba9efdc848f9..059b6e45a028 100644
--- a/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -400,7 +400,7 @@ enum rxrpc_tx_point {
 	EM(rxrpc_cong_begin_retransmission,	" Retrans") \
 	EM(rxrpc_cong_cleared_nacks,		" Cleared") \
 	EM(rxrpc_cong_new_low_nack,		" NewLowN") \
-	EM(rxrpc_cong_no_change,		"") \
+	EM(rxrpc_cong_no_change,		" -") \
 	EM(rxrpc_cong_progress,			" Progres") \
 	EM(rxrpc_cong_retransmit_again,		" ReTxAgn") \
 	EM(rxrpc_cong_rtt_window_end,		" RttWinE") \



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net 2/3] rxrpc: Fix handling of rwind from an ACK packet
  2020-06-18  7:50 [PATCH net 0/3] rxrpc: Performance drop fix and other fixes David Howells
  2020-06-18  7:50 ` [PATCH net 1/3] rxrpc: Fix trace string David Howells
@ 2020-06-18  7:50 ` David Howells
  2020-06-18  7:50 ` [PATCH net 3/3] rxrpc: Fix afs large storage transmission performance drop David Howells
  2020-06-20  2:57 ` [PATCH net 0/3] rxrpc: Performance drop fix and other fixes David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Howells @ 2020-06-18  7:50 UTC (permalink / raw)
  To: netdev; +Cc: dhowells, linux-afs, linux-kernel

The handling of the receive window size (rwind) from a received ACK packet
is not correct.  The rxrpc_input_ackinfo() function currently checks the
current Tx window size against the rwind from the ACK to see if it has
changed, but then limits the rwind size before storing it in the tx_winsize
member and, if it increased, wake up the transmitting process.  This means
that if rwind > RXRPC_RXTX_BUFF_SIZE - 1, this path will always be
followed.

Fix this by limiting rwind before we compare it to tx_winsize.

The effect of this can be seen by enabling the rxrpc_rx_rwind_change
tracepoint.

Fixes: 702f2ac87a9a ("rxrpc: Wake up the transmitter if Rx window size increases on the peer")
Signed-off-by: David Howells <dhowells@redhat.com>
---

 net/rxrpc/input.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 299ac98e9754..767579328a06 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -722,13 +722,12 @@ static void rxrpc_input_ackinfo(struct rxrpc_call *call, struct sk_buff *skb,
 	       ntohl(ackinfo->rxMTU), ntohl(ackinfo->maxMTU),
 	       rwind, ntohl(ackinfo->jumbo_max));
 
+	if (rwind > RXRPC_RXTX_BUFF_SIZE - 1)
+		rwind = RXRPC_RXTX_BUFF_SIZE - 1;
 	if (call->tx_winsize != rwind) {
-		if (rwind > RXRPC_RXTX_BUFF_SIZE - 1)
-			rwind = RXRPC_RXTX_BUFF_SIZE - 1;
 		if (rwind > call->tx_winsize)
 			wake = true;
-		trace_rxrpc_rx_rwind_change(call, sp->hdr.serial,
-					    ntohl(ackinfo->rwind), wake);
+		trace_rxrpc_rx_rwind_change(call, sp->hdr.serial, rwind, wake);
 		call->tx_winsize = rwind;
 	}
 



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net 3/3] rxrpc: Fix afs large storage transmission performance drop
  2020-06-18  7:50 [PATCH net 0/3] rxrpc: Performance drop fix and other fixes David Howells
  2020-06-18  7:50 ` [PATCH net 1/3] rxrpc: Fix trace string David Howells
  2020-06-18  7:50 ` [PATCH net 2/3] rxrpc: Fix handling of rwind from an ACK packet David Howells
@ 2020-06-18  7:50 ` David Howells
  2020-06-20  2:57 ` [PATCH net 0/3] rxrpc: Performance drop fix and other fixes David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Howells @ 2020-06-18  7:50 UTC (permalink / raw)
  To: netdev; +Cc: dhowells, linux-afs, linux-kernel

Commit 2ad6691d988c, which moved the modification of the status annotation
for a packet in the Tx buffer prior to the retransmission moved the state
clearance, but managed to lose the bit that set it to UNACK.

Consequently, if a retransmission occurs, the packet is accidentally
changed to the ACK state (ie. 0) by masking it off, which means that the
packet isn't counted towards the tally of newly-ACK'd packets if it gets
hard-ACK'd.  This then prevents the congestion control algorithm from
recovering properly.

Fix by reinstating the change of state to UNACK.

Spotted by the generic/460 xfstest.

Fixes: 2ad6691d988c ("rxrpc: Fix race between incoming ACK parser and retransmitter")
Signed-off-by: David Howells <dhowells@redhat.com>
---

 net/rxrpc/call_event.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c
index aa1c8eee6557..6be2672a65ea 100644
--- a/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -253,7 +253,7 @@ static void rxrpc_resend(struct rxrpc_call *call, unsigned long now_j)
 		 * confuse things
 		 */
 		annotation &= ~RXRPC_TX_ANNO_MASK;
-		annotation |= RXRPC_TX_ANNO_RESENT;
+		annotation |= RXRPC_TX_ANNO_UNACK | RXRPC_TX_ANNO_RESENT;
 		call->rxtx_annotations[ix] = annotation;
 
 		skb = call->rxtx_buffer[ix];



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net 0/3] rxrpc: Performance drop fix and other fixes
  2020-06-18  7:50 [PATCH net 0/3] rxrpc: Performance drop fix and other fixes David Howells
                   ` (2 preceding siblings ...)
  2020-06-18  7:50 ` [PATCH net 3/3] rxrpc: Fix afs large storage transmission performance drop David Howells
@ 2020-06-20  2:57 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2020-06-20  2:57 UTC (permalink / raw)
  To: dhowells; +Cc: netdev, linux-afs, linux-kernel

From: David Howells <dhowells@redhat.com>
Date: Thu, 18 Jun 2020 08:50:15 +0100

> 
> Here are three fixes for rxrpc:
> 
>  (1) Fix a trace symbol mapping.  It doesn't seem to let you map to "".
> 
>  (2) Fix the handling of the remote receive window size when it increases
>      beyond the size we can support for our transmit window.
> 
>  (3) Fix a performance drop caused by retransmitted packets being
>      accidentally marked as already ACK'd.
> 
> The patches are tagged here:
> 
> 	git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
> 	rxrpc-fixes-20200618

Pulled, thanks David.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-20  2:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18  7:50 [PATCH net 0/3] rxrpc: Performance drop fix and other fixes David Howells
2020-06-18  7:50 ` [PATCH net 1/3] rxrpc: Fix trace string David Howells
2020-06-18  7:50 ` [PATCH net 2/3] rxrpc: Fix handling of rwind from an ACK packet David Howells
2020-06-18  7:50 ` [PATCH net 3/3] rxrpc: Fix afs large storage transmission performance drop David Howells
2020-06-20  2:57 ` [PATCH net 0/3] rxrpc: Performance drop fix and other fixes 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).