From ec02cf442bd2c410e4bf63236232461c3fe402bf Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 15 May 2023 09:14:02 -0700 Subject: [PATCH] Use lower latency allocation in quorum socket The quorum udp socket allocation still allowed starting io which can trigger longer latencies trying to free memory. We change the flags to prefer dipping into emergency pools and then failing rather than blocking trying to satisfy an allocation. We'd much rather have a given heartbeat attempt fail and have the opportunity to succeed at the next interval rather than running the risk of blocking across multiple intervals. Signed-off-by: Zach Brown --- kmod/src/quorum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kmod/src/quorum.c b/kmod/src/quorum.c index e64ae67f..d93e8396 100644 --- a/kmod/src/quorum.c +++ b/kmod/src/quorum.c @@ -180,7 +180,8 @@ static int create_socket(struct super_block *sb) goto out; } - sock->sk->sk_allocation = GFP_NOFS; + /* rather fail and retry than block waiting for free */ + sock->sk->sk_allocation = GFP_ATOMIC; quorum_slot_sin(&qinf->qconf, qinf->our_quorum_slot_nr, &sin);