Add note for increasing shmmax if necessary
[fio.git] / flow.c
diff --git a/flow.c b/flow.c
index b7a2fb12287332eb01d7fe48cf0f0ad5eb7902dc..42b6dd75adbe63a4bbfc30ae26f5715a149e63d7 100644 (file)
--- a/flow.c
+++ b/flow.c
@@ -23,8 +23,11 @@ int flow_threshold_exceeded(struct thread_data *td)
 
        sign = td->o.flow > 0 ? 1 : -1;
        if (sign * flow->flow_counter > td->o.flow_watermark) {
-               if (td->o.flow_sleep)
+               if (td->o.flow_sleep) {
+                       io_u_quiesce(td);
                        usleep(td->o.flow_sleep);
+               }
+
                return 1;
        }
 
@@ -55,7 +58,7 @@ static struct fio_flow *flow_get(unsigned int id)
        if (!flow) {
                flow = smalloc(sizeof(*flow));
                if (!flow) {
-                       log_err("fio: smalloc pool exhausted\n");
+                       fio_mutex_up(flow_lock);
                        return NULL;
                }
                flow->refs = 0;