aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/lowcomms.c
diff options
context:
space:
mode:
authorPatrick Caulfield <pcaulfie@redhat.com>2007-09-14 08:49:21 +0100
committerSteven Whitehouse <swhiteho@redhat.com>2007-10-10 08:56:19 +0100
commitd66f8277f53407754f50ae6bada68f1b68d04d48 (patch)
tree8725f182541eb98e1947d8a224e61d66c2c959da /fs/dlm/lowcomms.c
parent[GFS2] Move inode deletion out of blocking_cb (diff)
downloadlinux-dev-d66f8277f53407754f50ae6bada68f1b68d04d48.tar.xz
linux-dev-d66f8277f53407754f50ae6bada68f1b68d04d48.zip
[DLM] Make dlm_sendd cond_resched more
Under high recovery loads dlm_sendd can monopolise the CPU and cause soft lockups. This one extra and one moved cond_resched() make it yield a little more during such times keeping work moving. Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm/lowcomms.c')
-rw-r--r--fs/dlm/lowcomms.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 62a8a6ccd992..58bf3f5cdbe2 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1264,14 +1264,15 @@ static void send_to_sock(struct connection *con)
if (len) {
ret = sendpage(con->sock, e->page, offset, len,
msg_flags);
- if (ret == -EAGAIN || ret == 0)
+ if (ret == -EAGAIN || ret == 0) {
+ cond_resched();
goto out;
+ }
if (ret <= 0)
goto send_error;
- } else {
+ }
/* Don't starve people filling buffers */
cond_resched();
- }
spin_lock(&con->writequeue_lock);
e->offset += ret;