summaryrefslogtreecommitdiffstats
path: root/include/trace/events/rxrpc.h
diff options
context:
space:
mode:
authorDavid Howells2017-11-24 11:18:42 +0100
committerDavid Howells2017-11-24 11:18:42 +0100
commitf859ab61875978eeaa539740ff7f7d91f5d60006 (patch)
tree9b8bccaeda8d2fab8a774e0e818dbff3868770b1 /include/trace/events/rxrpc.h
parentrxrpc: Add keepalive for a call (diff)
downloadkernel-qcow2-linux-f859ab61875978eeaa539740ff7f7d91f5d60006.tar.gz
kernel-qcow2-linux-f859ab61875978eeaa539740ff7f7d91f5d60006.tar.xz
kernel-qcow2-linux-f859ab61875978eeaa539740ff7f7d91f5d60006.zip
rxrpc: Fix service endpoint expiry
RxRPC service endpoints expire like they're supposed to by the following means: (1) Mark dead rxrpc_net structs (with ->live) rather than twiddling the global service conn timeout, otherwise the first rxrpc_net struct to die will cause connections on all others to expire immediately from then on. (2) Mark local service endpoints for which the socket has been closed (->service_closed) so that the expiration timeout can be much shortened for service and client connections going through that endpoint. (3) rxrpc_put_service_conn() needs to schedule the reaper when the usage count reaches 1, not 0, as idle conns have a 1 count. (4) The accumulator for the earliest time we might want to schedule for should be initialised to jiffies + MAX_JIFFY_OFFSET, not ULONG_MAX as the comparison functions use signed arithmetic. (5) Simplify the expiration handling, adding the expiration value to the idle timestamp each time rather than keeping track of the time in the past before which the idle timestamp must go to be expired. This is much easier to read. (6) Ignore the timeouts if the net namespace is dead. (7) Restart the service reaper work item rather the client reaper. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/trace/events/rxrpc.h')
-rw-r--r--include/trace/events/rxrpc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h
index e98fed6de497..36cb50c111a6 100644
--- a/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -49,6 +49,7 @@ enum rxrpc_conn_trace {
rxrpc_conn_put_client,
rxrpc_conn_put_service,
rxrpc_conn_queued,
+ rxrpc_conn_reap_service,
rxrpc_conn_seen,
};
@@ -221,6 +222,7 @@ enum rxrpc_congest_change {
EM(rxrpc_conn_put_client, "PTc") \
EM(rxrpc_conn_put_service, "PTs") \
EM(rxrpc_conn_queued, "QUE") \
+ EM(rxrpc_conn_reap_service, "RPs") \
E_(rxrpc_conn_seen, "SEE")
#define rxrpc_client_traces \