--------------------- PatchSet 10657 Date: 2008/07/16 12:38:32 Author: adri Branch: delay_pool_write Tag: (none) Log: * Document the new config option * Fix the write delay pools code to work. Its just using a linear array walk at the present time which'll have to do for testing; the randomised dequeue will just have to come later. Members: src/cf.data.pre:1.259.2.1->1.259.2.2 src/comm.c:1.60.2.3->1.60.2.4 Index: squid/src/cf.data.pre =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cf.data.pre,v retrieving revision 1.259.2.1 retrieving revision 1.259.2.2 diff -u -r1.259.2.1 -r1.259.2.2 --- squid/src/cf.data.pre 16 Jul 2008 12:15:41 -0000 1.259.2.1 +++ squid/src/cf.data.pre 16 Jul 2008 12:38:32 -0000 1.259.2.2 @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.259.2.1 2008/07/16 12:15:41 adri Exp $ +# $Id: cf.data.pre,v 1.259.2.2 2008/07/16 12:38:32 adri Exp $ # # SQUID Web Proxy Cache http://www.squid-cache.org/ # ---------------------------------------------------------- @@ -4100,6 +4100,15 @@ DEFAULT: none IFDEF: DELAY_POOLS LOC: Config.Delay.accessClientReply +DOC_START + This is used to determine which delay pool a client-side connection + falls into, based on the -reply- information. The delay is introduced + on the data being sent to the client regardless of whether the data + is coming from the cache or from an upstream. + + The default is to not client-delay any replies. +DOC_END + NAME: delay_parameters TYPE: delay_pool_rates Index: squid/src/comm.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/comm.c,v retrieving revision 1.60.2.3 retrieving revision 1.60.2.4 diff -u -r1.60.2.3 -r1.60.2.4 --- squid/src/comm.c 16 Jul 2008 09:09:39 -0000 1.60.2.3 +++ squid/src/comm.c 16 Jul 2008 12:38:33 -0000 1.60.2.4 @@ -1,6 +1,6 @@ /* - * $Id: comm.c,v 1.60.2.3 2008/07/16 09:09:39 adri Exp $ + * $Id: comm.c,v 1.60.2.4 2008/07/16 12:38:33 adri Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -1223,12 +1223,12 @@ /* Swap the lists over so additions don't end up on this list */ n = n_slow_wfds; + debug(5, 5) ("wfds: %d fds\n", n_slow_wfds); comm_slow_wfds_swap_list(); - while (n) { - j = (squid_random() % n) + 1; + for (j = 0; j < n; j++) { fd = slow_wfds_alt[j]; F = &fd_table[fd]; - n--; + debug(5, 5) ("wfds: pos %d - fd %d\n", j, fd); /* call the write callback attempt - this may requeue the FD for sleep */ F->rwstate.write_delayed = 0; /* let the write run now */