@@ -949,6 +949,7 @@
{
struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
ssize_t ret;
+ int send_fails = 20;
while (1) {
mutex_lock(&sc->sc_send_lock);
@@ -959,10 +960,11 @@
mutex_unlock(&sc->sc_send_lock);
if (ret == size)
break;
- if (ret == (ssize_t)-EAGAIN) {
+ if (ret == (ssize_t)-EAGAIN && send_fails > 0) {
mlog(0, "sendpage of size %zu to " SC_NODEF_FMT
" returned EAGAIN\n", size, SC_NODEF_ARGS(sc));
cond_resched();
+ --send_fails;
continue;
}
mlog(ML_ERROR, "sendpage of size %zu to " SC_NODEF_FMT