summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/proc.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2024-01-30 21:37:16 +0000
committerDavid Howells <dhowells@redhat.com>2024-03-05 23:35:25 +0000
commit153f90a066dd4a91ef7edc0df3964dd097a5e2a5 (patch)
tree9c5dc463db099075963b28398862bd142f94fa4e /net/rxrpc/proc.c
parent12a66e77c4999b97a2c2b8f5e4e7533c656cee12 (diff)
downloadlinux-stable-153f90a066dd4a91ef7edc0df3964dd097a5e2a5.tar.gz
linux-stable-153f90a066dd4a91ef7edc0df3964dd097a5e2a5.tar.bz2
linux-stable-153f90a066dd4a91ef7edc0df3964dd097a5e2a5.zip
rxrpc: Use ktimes for call timeout tracking and set the timer lazily
Track the call timeouts as ktimes rather than jiffies as the latter's granularity is too high and only set the timer at the end of the event handling function. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: "David S. Miller" <davem@davemloft.net> cc: Eric Dumazet <edumazet@google.com> cc: Jakub Kicinski <kuba@kernel.org> cc: Paolo Abeni <pabeni@redhat.com> cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org
Diffstat (limited to 'net/rxrpc/proc.c')
-rw-r--r--net/rxrpc/proc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/rxrpc/proc.c b/net/rxrpc/proc.c
index 26dc2f26d92d..263a2251e3d2 100644
--- a/net/rxrpc/proc.c
+++ b/net/rxrpc/proc.c
@@ -52,9 +52,9 @@ static int rxrpc_call_seq_show(struct seq_file *seq, void *v)
struct rxrpc_call *call;
struct rxrpc_net *rxnet = rxrpc_net(seq_file_net(seq));
enum rxrpc_call_state state;
- unsigned long timeout = 0;
rxrpc_seq_t acks_hard_ack;
char lbuff[50], rbuff[50];
+ long timeout = 0;
if (v == &rxnet->calls) {
seq_puts(seq,
@@ -76,10 +76,8 @@ static int rxrpc_call_seq_show(struct seq_file *seq, void *v)
sprintf(rbuff, "%pISpc", &call->dest_srx.transport);
state = rxrpc_call_state(call);
- if (state != RXRPC_CALL_SERVER_PREALLOC) {
- timeout = READ_ONCE(call->expect_rx_by);
- timeout -= jiffies;
- }
+ if (state != RXRPC_CALL_SERVER_PREALLOC)
+ timeout = ktime_ms_delta(READ_ONCE(call->expect_rx_by), ktime_get_real());
acks_hard_ack = READ_ONCE(call->acks_hard_ack);
seq_printf(seq,
@@ -309,7 +307,7 @@ static int rxrpc_peer_seq_show(struct seq_file *seq, void *v)
peer->mtu,
now - peer->last_tx_at,
peer->srtt_us >> 3,
- jiffies_to_usecs(peer->rto_j));
+ peer->rto_us);
return 0;
}