From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Wed, 23 Jun 2021 11:14:51 -0400 Subject: [Cluster-devel] [RFC dlm/next 12/15] fs: dlm: remove send starve In-Reply-To: <20210623151454.176649-1-aahringo@redhat.com> References: <20210623151454.176649-1-aahringo@redhat.com> Message-ID: <20210623151454.176649-13-aahringo@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This patch removes starve handling in case of sending to much. I think this was introduced that it can serve some other connections when sending to much. However we now have not an ordered workqueue anymore and can handle multiple connection kernel_sendpage() at one time. Signed-off-by: Alexander Aring --- fs/dlm/lowcomms.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 28d97f8187a5..ddf3c0c98386 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -61,7 +61,6 @@ #define NEEDED_RMEM (4*1024*1024) /* Number of messages to send before rescheduling */ -#define MAX_SEND_MSG_COUNT 25 #define DLM_SHUTDOWN_WAIT_TIMEOUT msecs_to_jiffies(10000) struct connection { @@ -1464,7 +1463,6 @@ static void send_to_sock(struct connection *con) const int msg_flags = MSG_DONTWAIT | MSG_NOSIGNAL; struct writequeue_entry *e; int len, offset, ret; - int count = 0; mutex_lock(&con->swork_lock); if (con->sock == NULL) { @@ -1501,12 +1499,6 @@ static void send_to_sock(struct connection *con) } else if (ret < 0) goto out; - /* Don't starve people filling buffers */ - if (++count >= MAX_SEND_MSG_COUNT) { - cond_resched(); - count = 0; - } - spin_lock(&con->writequeue_lock); writequeue_entry_complete(e, ret); } -- 2.26.3