Note re memory pressure and the queue shoveller

This commit is contained in:
Tony Garnock-Jones 2011-01-10 14:48:39 -05:00
parent fa222940fc
commit 4df94ffe40
1 changed files with 3 additions and 0 deletions

View File

@ -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);