]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rxrpc: Don't need barrier for ->tx_bottom and ->acks_hard_ack
authorDavid Howells <dhowells@redhat.com>
Wed, 4 Dec 2024 07:46:45 +0000 (07:46 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 9 Dec 2024 21:48:27 +0000 (13:48 -0800)
commit6396b48ac0a77165f9c2c40ab03d6c8188c89739
tree7d9d87eb371563b07799f2ae8b571786537c3157
parent976b0ca5aae741ef33f4cf4079a9a026331eae88
rxrpc: Don't need barrier for ->tx_bottom and ->acks_hard_ack

We don't need a barrier for the ->tx_bottom value (which indicates the
lowest sequence still in the transmission queue) and the ->acks_hard_ack
value (which tracks the DATA packets hard-ack'd by the latest ACK packet
received and thus indicates which DATA packets can now be discarded) as the
app thread doesn't use either value as a reference to memory to access.
Rather, the app thread merely uses these as a guide to how much space is
available in the transmission queue

Change the code to use READ/WRITE_ONCE() instead.

Also, change rxrpc_check_tx_space() to use the same value for tx_bottom
throughout.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://patch.msgid.link/20241204074710.990092-18-dhowells@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/rxrpc/sendmsg.c
net/rxrpc/txbuf.c