Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1490766 > unrolled thread
| Started by | David Howells <dhowells@redhat.com> |
|---|---|
| First post | 2016-09-25 01:30 +0200 |
| Last post | 2016-09-25 12:00 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH net-next 0/8] rxrpc: Implement slow-start and other bits David Howells <dhowells@redhat.com> - 2016-09-25 01:30 +0200
[PATCH net-next 3/8] rxrpc: Include the last reply DATA serial number in the final ACK David Howells <dhowells@redhat.com> - 2016-09-25 01:30 +0200
[PATCH net-next 7/8] rxrpc: Schedule an ACK if the reply to a client call appears overdue David Howells <dhowells@redhat.com> - 2016-09-25 01:30 +0200
Re: [PATCH net-next 0/8] rxrpc: Implement slow-start and other bits David Miller <davem@davemloft.net> - 2016-09-25 12:00 +0200
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-25 01:30 +0200 |
| Subject | [PATCH net-next 0/8] rxrpc: Implement slow-start and other bits |
| Message-ID | <sl4ym-7ou-7@gated-at.bofh.it> |
This set of patches implements the RxRPC slow-start feature for AF_RXRPC to
improve performance and handling of occasional packet loss. This is more or
less the same as TCP slow start [RFC 5681]. Firstly, there are some ACK
generation improvements:
(1) Send ACKs regularly to apprise the peer of our state so that they can do
congestion management of their own.
(2) Send an ACK when we fill in a hole in the buffer so that the peer can
find out that we did this thus forestalling retransmission.
(3) Note the final DATA packet's serial number in the final ACK for
correlation purposes.
and a couple of bug fixes:
(4) Reinitialise the ACK state and clear the ACK and resend timers upon
entering the client reply reception phase to kill off any pending probe
ACKs.
(5) Delay the resend timer to allow for nsec->jiffies conversion errors.
and then there's the slow-start pieces:
(6) Summarise an ACK.
(7) Schedule a PING or IDLE ACK if the reply to a client call is overdue to
try and find out what happened to it.
(8) Implement the slow start feature.
The patches can be found here also:
http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-rewrite
Tagged thusly:
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
rxrpc-rewrite-20160924
David
---
David Howells (8):
rxrpc: Send an ACK after every few DATA packets we receive
rxrpc: Send an immediate ACK if we fill in a hole
rxrpc: Include the last reply DATA serial number in the final ACK
rxrpc: Reinitialise the call ACK and timer state for client reply phase
rxrpc: Delay the resend timer to allow for nsec->jiffies conv error
rxrpc: Generate a summary of the ACK state for later use
rxrpc: Schedule an ACK if the reply to a client call appears overdue
rxrpc: Implement slow-start
include/trace/events/rxrpc.h | 45 ++++++++
net/rxrpc/ar-internal.h | 71 ++++++++++++
net/rxrpc/call_event.c | 47 +++++++-
net/rxrpc/call_object.c | 13 ++
net/rxrpc/conn_event.c | 1
net/rxrpc/input.c | 241 +++++++++++++++++++++++++++++++++++++++---
net/rxrpc/misc.c | 23 ++++
net/rxrpc/output.c | 34 ++++--
net/rxrpc/recvmsg.c | 19 +++
net/rxrpc/sendmsg.c | 7 +
10 files changed, 463 insertions(+), 38 deletions(-)
[toc] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-25 01:30 +0200 |
| Subject | [PATCH net-next 3/8] rxrpc: Include the last reply DATA serial number in the final ACK |
| Message-ID | <sl4ym-7ou-25@gated-at.bofh.it> |
| In reply to | #1490766 |
In a client call, include the serial number of the last DATA packet of the
reply in the final ACK.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/recvmsg.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c
index a7458c398b9e..038ae62ddb4d 100644
--- a/net/rxrpc/recvmsg.c
+++ b/net/rxrpc/recvmsg.c
@@ -133,7 +133,7 @@ static int rxrpc_recvmsg_new_call(struct rxrpc_sock *rx,
/*
* End the packet reception phase.
*/
-static void rxrpc_end_rx_phase(struct rxrpc_call *call)
+static void rxrpc_end_rx_phase(struct rxrpc_call *call, rxrpc_serial_t serial)
{
_enter("%d,%s", call->debug_id, rxrpc_call_states[call->state]);
@@ -141,7 +141,7 @@ static void rxrpc_end_rx_phase(struct rxrpc_call *call)
ASSERTCMP(call->rx_hard_ack, ==, call->rx_top);
if (call->state == RXRPC_CALL_CLIENT_RECV_REPLY) {
- rxrpc_propose_ACK(call, RXRPC_ACK_IDLE, 0, 0, true, false,
+ rxrpc_propose_ACK(call, RXRPC_ACK_IDLE, 0, serial, true, false,
rxrpc_propose_ack_terminal_ack);
rxrpc_send_call_packet(call, RXRPC_PACKET_TYPE_ACK);
}
@@ -202,7 +202,7 @@ static void rxrpc_rotate_rx_window(struct rxrpc_call *call)
_debug("%u,%u,%02x", hard_ack, top, flags);
trace_rxrpc_receive(call, rxrpc_receive_rotate, serial, hard_ack);
if (flags & RXRPC_LAST_PACKET) {
- rxrpc_end_rx_phase(call);
+ rxrpc_end_rx_phase(call, serial);
} else {
/* Check to see if there's an ACK that needs sending. */
if (after_eq(hard_ack, call->ackr_consumed + 2) ||
[toc] | [prev] | [next] | [standalone]
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Date | 2016-09-25 01:30 +0200 |
| Subject | [PATCH net-next 7/8] rxrpc: Schedule an ACK if the reply to a client call appears overdue |
| Message-ID | <sl4ym-7ou-17@gated-at.bofh.it> |
| In reply to | #1490766 |
If we've sent all the request data in a client call but haven't seen any
sign of the reply data yet, schedule an ACK to be sent to the server to
find out if the reply data got lost.
If the server hasn't yet hard-ACK'd the request data, we send a PING ACK to
demand a response to find out whether we need to retransmit.
If the server says it has received all of the data, we send an IDLE ACK to
tell the server that we haven't received anything in the receive phase as
yet.
To make this work, a non-immediate PING ACK must carry a delay. I've chosen
the same as the IDLE ACK for the moment.
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/ar-internal.h | 2 ++
net/rxrpc/call_event.c | 1 +
net/rxrpc/input.c | 8 ++++++++
net/rxrpc/misc.c | 2 ++
4 files changed, 13 insertions(+)
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 1a700b6a998b..b1e697fc9ffb 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -707,7 +707,9 @@ enum rxrpc_timer_trace {
extern const char rxrpc_timer_traces[rxrpc_timer__nr_trace][8];
enum rxrpc_propose_ack_trace {
+ rxrpc_propose_ack_client_tx_end,
rxrpc_propose_ack_input_data,
+ rxrpc_propose_ack_ping_for_lost_reply,
rxrpc_propose_ack_ping_for_params,
rxrpc_propose_ack_respond_to_ack,
rxrpc_propose_ack_respond_to_ping,
diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c
index d5bf9ce7ec6f..05b94d1acf52 100644
--- a/net/rxrpc/call_event.c
+++ b/net/rxrpc/call_event.c
@@ -100,6 +100,7 @@ static void __rxrpc_propose_ACK(struct rxrpc_call *call, u8 ack_reason,
expiry = rxrpc_soft_ack_delay;
break;
+ case RXRPC_ACK_PING:
case RXRPC_ACK_IDLE:
if (rxrpc_idle_ack_delay < expiry)
expiry = rxrpc_idle_ack_delay;
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index dd699667eeef..0344f4494eb7 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -138,6 +138,8 @@ static bool rxrpc_end_tx_phase(struct rxrpc_call *call, bool reply_begun,
write_unlock(&call->state_lock);
if (call->state == RXRPC_CALL_CLIENT_AWAIT_REPLY) {
+ rxrpc_propose_ACK(call, RXRPC_ACK_IDLE, 0, 0, false, true,
+ rxrpc_propose_ack_client_tx_end);
trace_rxrpc_transmit(call, rxrpc_transmit_await_reply);
} else {
trace_rxrpc_transmit(call, rxrpc_transmit_end);
@@ -684,6 +686,12 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb,
return;
}
+ if (call->rxtx_annotations[call->tx_top & RXRPC_RXTX_BUFF_MASK] &
+ RXRPC_TX_ANNO_LAST &&
+ summary.nr_acks == call->tx_top - hard_ack)
+ rxrpc_propose_ACK(call, RXRPC_ACK_PING, skew, sp->hdr.serial,
+ false, true,
+ rxrpc_propose_ack_ping_for_lost_reply);
}
/*
diff --git a/net/rxrpc/misc.c b/net/rxrpc/misc.c
index 901c012a2700..a608769343e6 100644
--- a/net/rxrpc/misc.c
+++ b/net/rxrpc/misc.c
@@ -198,7 +198,9 @@ const char rxrpc_timer_traces[rxrpc_timer__nr_trace][8] = {
};
const char rxrpc_propose_ack_traces[rxrpc_propose_ack__nr_trace][8] = {
+ [rxrpc_propose_ack_client_tx_end] = "ClTxEnd",
[rxrpc_propose_ack_input_data] = "DataIn ",
+ [rxrpc_propose_ack_ping_for_lost_reply] = "LostRpl",
[rxrpc_propose_ack_ping_for_params] = "Params ",
[rxrpc_propose_ack_respond_to_ack] = "Rsp2Ack",
[rxrpc_propose_ack_respond_to_ping] = "Rsp2Png",
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-09-25 12:00 +0200 |
| Message-ID | <sleo2-4Vy-3@gated-at.bofh.it> |
| In reply to | #1490766 |
From: David Howells <dhowells@redhat.com> Date: Sun, 25 Sep 2016 00:24:56 +0100 > This set of patches implements the RxRPC slow-start feature for AF_RXRPC to > improve performance and handling of occasional packet loss. This is more or > less the same as TCP slow start [RFC 5681]. Firstly, there are some ACK > generation improvements: ... > Tagged thusly: > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git > rxrpc-rewrite-20160924 Pulled, thanks David.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web