summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/output.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-10-17 11:44:22 +0100
committerDavid Howells <dhowells@redhat.com>2023-01-31 16:38:26 +0000
commit5bbf953382bec6d3b7003e9389668c1d0863db31 (patch)
treec7e55b8e988b8db8d183cc4469483f677078b05f /net/rxrpc/output.c
parent84e28aa513af814807a5e9a0e5f3cab773946f3c (diff)
downloadlinux-5bbf953382bec6d3b7003e9389668c1d0863db31.tar.gz
linux-5bbf953382bec6d3b7003e9389668c1d0863db31.tar.bz2
linux-5bbf953382bec6d3b7003e9389668c1d0863db31.zip
rxrpc: De-atomic call->ackr_window and call->ackr_nr_unacked
call->ackr_window doesn't need to be atomic as ACK generation and ACK transmission are now done in the same thread, so drop the atomic64 handling and split it into two separate members. Similarly, call->ackr_nr_unacked doesn't need to be atomic now either. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org
Diffstat (limited to 'net/rxrpc/output.c')
-rw-r--r--net/rxrpc/output.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c
index 98b5d0db7761..b6bd5e6ccb4c 100644
--- a/net/rxrpc/output.c
+++ b/net/rxrpc/output.c
@@ -86,20 +86,18 @@ static size_t rxrpc_fill_out_ack(struct rxrpc_connection *conn,
unsigned int qsize;
rxrpc_seq_t window, wtop, wrap_point, ix, first;
int rsize;
- u64 wtmp;
u32 mtu, jmax;
u8 *ackp = txb->acks;
u8 sack_buffer[sizeof(call->ackr_sack_table)] __aligned(8);
- atomic_set(&call->ackr_nr_unacked, 0);
+ call->ackr_nr_unacked = 0;
atomic_set(&call->ackr_nr_consumed, 0);
rxrpc_inc_stat(call->rxnet, stat_tx_ack_fill);
/* Barrier against rxrpc_input_data(). */
retry:
- wtmp = atomic64_read_acquire(&call->ackr_window);
- window = lower_32_bits(wtmp);
- wtop = upper_32_bits(wtmp);
+ window = call->ackr_window;
+ wtop = call->ackr_wtop;
txb->ack.firstPacket = htonl(window);
txb->ack.nAcks = 0;
@@ -111,9 +109,8 @@ retry:
*/
memcpy(sack_buffer, call->ackr_sack_table, sizeof(sack_buffer));
wrap_point = window + RXRPC_SACK_SIZE - 1;
- wtmp = atomic64_read_acquire(&call->ackr_window);
- window = lower_32_bits(wtmp);
- wtop = upper_32_bits(wtmp);
+ window = call->ackr_window;
+ wtop = call->ackr_wtop;
if (after(wtop, wrap_point)) {
cond_resched();
goto retry;