fs: dlm: implement delayed ack handling
Alexander Aring
maintainerPATCH 1/1 fs: dlm: implement delayed ack handling
This patch changes that we don't ack each message. Lowcomms will take care about to send an ack back after a bulk of messages was processed. Currently it's only when the whole receive buffer was processed, there might better positions to send an ack back but only the lowcomms implementation know when there are more data to receive. This patch has also disadvantages that we might retransmit more on errors, however this is a very rare case.
Tested with make_panic on gfs2 with three nodes by running:
trace-cmd record -p function -l 'dlm_send_ack' sleep 100
and
trace-cmd report | wc -l
Before patch:
- 20548
- 21376
- 21398
After patch:
- 18338
- 20679
- 19949
Signed-off-by Alexander Aring <[email protected]>
--- fs/dlm/lowcomms.c | 1 + fs/dlm/lowcomms.h | 1 + fs/dlm/midcomms.c | 56 ++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 50 insertions(+), 8 deletions(-)
fs/dlm/lowcomms.c +1 -0
@@ -947,6 +947,7 @@ static int receive_from_sock(struct connection *con) } } +dlm_midcomms_receive_done (con->nodeid);mutex_unlock (&con->sock_mutex);return 0 ;
fs/dlm/lowcomms.h +1 -0
@@ -46,6 +46,7 @@ int dlm_lowcomms_resend_msg(struct dlm_msg *msg);int dlm_lowcomms_connect_node (int nodeid);int dlm_lowcomms_nodes_set_mark (int nodeid,unsigned int mark);int dlm_lowcomms_addr (int nodeid,struct sockaddr_storage *addr,int len); +void dlm_midcomms_receive_done (int nodeid);#endif /* __LOWCOMMS_DOT_H__ */
fs/dlm/midcomms.c +48 -8
89 lines not on this page · raw message
Signature · 1 line
2.27.0