* [PATCH 02/41] rxrpc: Fix two connection reaping bugs [not found] <20231109154004.3317227-1-dhowells@redhat.com> @ 2023-11-09 15:39 ` David Howells 2023-11-09 17:27 ` Jeffrey E Altman 2023-11-09 17:50 ` patchwork-bot+netdevbpf 0 siblings, 2 replies; 3+ messages in thread From: David Howells @ 2023-11-09 15:39 UTC (permalink / raw) To: Marc Dionne Cc: David Howells, linux-afs, linux-fsdevel, linux-kernel, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev Fix two connection reaping bugs: (1) rxrpc_connection_expiry is in units of seconds, so rxrpc_disconnect_call() needs to multiply it by HZ when adding it to jiffies. (2) rxrpc_client_conn_reap_timeout() should set RXRPC_CLIENT_REAP_TIMER if local->kill_all_client_conns is clear, not if it is set (in which case we don't need the timer). Without this, old client connections don't get cleaned up until the local endpoint is cleaned up. Fixes: 5040011d073d ("rxrpc: Make the local endpoint hold a ref on a connected call") Fixes: 0d6bf319bc5a ("rxrpc: Move the client conn cache management to the I/O thread") 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: netdev@vger.kernel.org cc: linux-afs@lists.infradead.org --- net/rxrpc/conn_object.c | 2 +- net/rxrpc/local_object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/conn_object.c b/net/rxrpc/conn_object.c index ac85d4644a3c..df8a271948a1 100644 --- a/net/rxrpc/conn_object.c +++ b/net/rxrpc/conn_object.c @@ -212,7 +212,7 @@ void rxrpc_disconnect_call(struct rxrpc_call *call) conn->idle_timestamp = jiffies; if (atomic_dec_and_test(&conn->active)) rxrpc_set_service_reap_timer(conn->rxnet, - jiffies + rxrpc_connection_expiry); + jiffies + rxrpc_connection_expiry * HZ); } rxrpc_put_call(call, rxrpc_call_put_io_thread); diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index 7d910aee4f8c..c553a30e9c83 100644 --- a/net/rxrpc/local_object.c +++ b/net/rxrpc/local_object.c @@ -87,7 +87,7 @@ static void rxrpc_client_conn_reap_timeout(struct timer_list *timer) struct rxrpc_local *local = container_of(timer, struct rxrpc_local, client_conn_reap_timer); - if (local->kill_all_client_conns && + if (!local->kill_all_client_conns && test_and_set_bit(RXRPC_CLIENT_CONN_REAP_TIMER, &local->client_conn_flags)) rxrpc_wake_up_io_thread(local); } ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 02/41] rxrpc: Fix two connection reaping bugs 2023-11-09 15:39 ` [PATCH 02/41] rxrpc: Fix two connection reaping bugs David Howells @ 2023-11-09 17:27 ` Jeffrey E Altman 2023-11-09 17:50 ` patchwork-bot+netdevbpf 1 sibling, 0 replies; 3+ messages in thread From: Jeffrey E Altman @ 2023-11-09 17:27 UTC (permalink / raw) To: David Howells, Marc Dionne Cc: linux-afs, linux-fsdevel, linux-kernel, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev [-- Attachment #1: Type: text/plain, Size: 1098 bytes --] On 11/9/2023 10:39 AM, David Howells wrote: > Fix two connection reaping bugs: > > (1) rxrpc_connection_expiry is in units of seconds, so > rxrpc_disconnect_call() needs to multiply it by HZ when adding it to > jiffies. > > (2) rxrpc_client_conn_reap_timeout() should set RXRPC_CLIENT_REAP_TIMER if > local->kill_all_client_conns is clear, not if it is set (in which case > we don't need the timer). Without this, old client connections don't > get cleaned up until the local endpoint is cleaned up. > > Fixes: 5040011d073d ("rxrpc: Make the local endpoint hold a ref on a connected call") > Fixes: 0d6bf319bc5a ("rxrpc: Move the client conn cache management to the I/O thread") > 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: netdev@vger.kernel.org > cc: linux-afs@lists.infradead.org > --- Reviewed-by: Jeffrey Altman <jaltman@auristor.com> [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4039 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 02/41] rxrpc: Fix two connection reaping bugs 2023-11-09 15:39 ` [PATCH 02/41] rxrpc: Fix two connection reaping bugs David Howells 2023-11-09 17:27 ` Jeffrey E Altman @ 2023-11-09 17:50 ` patchwork-bot+netdevbpf 1 sibling, 0 replies; 3+ messages in thread From: patchwork-bot+netdevbpf @ 2023-11-09 17:50 UTC (permalink / raw) To: David Howells Cc: marc.dionne, linux-afs, linux-fsdevel, linux-kernel, davem, edumazet, kuba, pabeni, netdev Hello: This patch was applied to bpf/bpf.git (master) by Jakub Kicinski <kuba@kernel.org>: On Thu, 9 Nov 2023 15:39:25 +0000 you wrote: > Fix two connection reaping bugs: > > (1) rxrpc_connection_expiry is in units of seconds, so > rxrpc_disconnect_call() needs to multiply it by HZ when adding it to > jiffies. > > (2) rxrpc_client_conn_reap_timeout() should set RXRPC_CLIENT_REAP_TIMER if > local->kill_all_client_conns is clear, not if it is set (in which case > we don't need the timer). Without this, old client connections don't > get cleaned up until the local endpoint is cleaned up. > > [...] Here is the summary with links: - [02/41] rxrpc: Fix two connection reaping bugs https://git.kernel.org/bpf/bpf/c/61e4a8660002 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-09 17:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231109154004.3317227-1-dhowells@redhat.com>
2023-11-09 15:39 ` [PATCH 02/41] rxrpc: Fix two connection reaping bugs David Howells
2023-11-09 17:27 ` Jeffrey E Altman
2023-11-09 17:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox