[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>
This commit is contained in:
parent
49e61f2ef6
commit
d66f8277f5
1 changed files with 4 additions and 3 deletions
|
@ -1264,14 +1264,15 @@ static void send_to_sock(struct connection *con)
|
||||||
if (len) {
|
if (len) {
|
||||||
ret = sendpage(con->sock, e->page, offset, len,
|
ret = sendpage(con->sock, e->page, offset, len,
|
||||||
msg_flags);
|
msg_flags);
|
||||||
if (ret == -EAGAIN || ret == 0)
|
if (ret == -EAGAIN || ret == 0) {
|
||||||
|
cond_resched();
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
goto send_error;
|
goto send_error;
|
||||||
} else {
|
}
|
||||||
/* Don't starve people filling buffers */
|
/* Don't starve people filling buffers */
|
||||||
cond_resched();
|
cond_resched();
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock(&con->writequeue_lock);
|
spin_lock(&con->writequeue_lock);
|
||||||
e->offset += ret;
|
e->offset += ret;
|
||||||
|
|
Loading…
Reference in a new issue