From 4df94ffe4080009d0219865555f81371ab19e008 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 10 Jan 2011 14:48:39 -0500 Subject: [PATCH] Note re memory pressure and the queue shoveller --- server/queue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/queue.c b/server/queue.c index 3035ebe..721ad77 100644 --- a/server/queue.c +++ b/server/queue.c @@ -144,6 +144,9 @@ static void shoveller(void *qv) { end_burst(q, &burst_count, total_count); //info("Waiting for throck\n"); q->shovel_awake = 0; + /* TODO: if the number of active processes is large, assume we have + memory pressure, and quit the shovel early rather than waiting + for a few milliseconds to see if we're idle. */ if (nap(100)) { cmsg_bytes_t n = sexp_data(q->name); info("Queue <<%.*s>> idle. Shoveller exiting\n", n.len, n.bytes);