Skip to content

Commit cbd0089

Browse files
committed
rxrpc: Adjust the call ref tracepoint to show kernel API refs
Adjust the call ref tracepoint to show references held on a call by the kernel API separately as much as possible and add an additional trace to at the allocation point from the preallocation buffer for an incoming call. Note that this doesn't show the allocation of a client call for the kernel separately at the moment. Signed-off-by: David Howells <[email protected]>
1 parent 01fd074 commit cbd0089

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

net/rxrpc/af_rxrpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void rxrpc_kernel_end_call(struct socket *sock, struct rxrpc_call *call)
299299
{
300300
_enter("%d{%d}", call->debug_id, atomic_read(&call->usage));
301301
rxrpc_release_call(rxrpc_sk(sock->sk), call);
302-
rxrpc_put_call(call, rxrpc_call_put);
302+
rxrpc_put_call(call, rxrpc_call_put_kernel);
303303
}
304304
EXPORT_SYMBOL(rxrpc_kernel_end_call);
305305

net/rxrpc/ar-internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,10 @@ enum rxrpc_call_trace {
540540
rxrpc_call_seen,
541541
rxrpc_call_got,
542542
rxrpc_call_got_userid,
543+
rxrpc_call_got_kernel,
543544
rxrpc_call_put,
544545
rxrpc_call_put_userid,
546+
rxrpc_call_put_kernel,
545547
rxrpc_call_put_noqueue,
546548
rxrpc_call__nr_trace
547549
};

net/rxrpc/call_accept.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static int rxrpc_service_prealloc_one(struct rxrpc_sock *rx,
121121

122122
call->user_call_ID = user_call_ID;
123123
call->notify_rx = notify_rx;
124-
rxrpc_get_call(call, rxrpc_call_got);
124+
rxrpc_get_call(call, rxrpc_call_got_kernel);
125125
user_attach_call(call, user_call_ID);
126126
rxrpc_get_call(call, rxrpc_call_got_userid);
127127
rb_link_node(&call->sock_node, parent, pp);
@@ -300,6 +300,7 @@ static struct rxrpc_call *rxrpc_alloc_incoming_call(struct rxrpc_sock *rx,
300300
smp_store_release(&b->call_backlog_tail,
301301
(call_tail + 1) & (RXRPC_BACKLOG_MAX - 1));
302302

303+
rxrpc_see_call(call);
303304
call->conn = conn;
304305
call->peer = rxrpc_get_peer(conn->params.peer);
305306
return call;

net/rxrpc/call_object.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ const char rxrpc_call_traces[rxrpc_call__nr_trace][4] = {
5656
[rxrpc_call_seen] = "SEE",
5757
[rxrpc_call_got] = "GOT",
5858
[rxrpc_call_got_userid] = "Gus",
59+
[rxrpc_call_got_kernel] = "Gke",
5960
[rxrpc_call_put] = "PUT",
6061
[rxrpc_call_put_userid] = "Pus",
62+
[rxrpc_call_put_kernel] = "Pke",
6163
[rxrpc_call_put_noqueue] = "PNQ",
6264
};
6365

0 commit comments

Comments
 (0)