From: Amos Jeffries Date: Thu, 19 Feb 2009 02:03:33 +0000 (+1300) Subject: Author: Henrik Nordstrom X-Git-Tag: SQUID_3_0_STABLE14~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb07abaf3e44d2602ad6c85ab0c03bdbf244064f;p=thirdparty%2Fsquid.git Author: Henrik Nordstrom Need to kick all deferred reads when a delaypool is updated, otherwise things queue up too long. The chaos SHOULD be addressed by randomizing the order... (not yet done. XXX comment addded in comm.cc) --- diff --git a/src/DelayPool.cc b/src/DelayPool.cc index d8e837d792..358f004af2 100644 --- a/src/DelayPool.cc +++ b/src/DelayPool.cc @@ -115,11 +115,7 @@ CompositePoolNode::delayRead(DeferredRead const &aRead) void CompositePoolNode::kickReads() { - /* we only start one, because delay pools may have **many** attached connections, - * and kicking them all off would be chaotic. - * This may need to be reviewed. - */ - deferredReads.kickReads(1); + deferredReads.kickReads(-1); } #endif diff --git a/src/comm.cc b/src/comm.cc index 5eecf5601d..4bb5e98692 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -2495,6 +2495,7 @@ DeferredReadManager::flushReads() { reads = deferredReads; deferredReads = ListContainer(); + // XXX: For fairness this SHOULD randomize the order while (!reads.empty()) { DeferredRead aRead = popHead(reads); kickARead(aRead);