wessels [Sun, 24 May 1998 09:41:06 +0000 (09:41 +0000)]
Changes to hash_first, hash_next. The **Current idea has bugs, so now
we keep state with a ->next pointer. This simplifies the hash.c code
somewhat, but requires an interface change so that hash_first() only
initializes ->next and does not return a value. Now we always use
rousskov [Sat, 23 May 1998 04:52:40 +0000 (04:52 +0000)]
Added:
- Fixed an assertion coredump in statHistCopy from
reconfiguring with different #peers in squid.conf
- Disable persistent connections for client connections
from broken Netscape User-Agent, version 3.* (Stewart Forster)
wessels [Sat, 23 May 1998 03:11:47 +0000 (03:11 +0000)]
From: Henrik Nordstrom <hno@hem.passagen.se>
==============================================================================
Here is a in large parts reworked patch for async I/O. This replaces all
of my previous async-io patch (which was messy and broken).
* The read offset was not preserved, corrupting deferred hits on
pipelined connections.
* Main <-> I/O thread communication is done using a single request
pointer, optionally protected by a mutex.
* CPU spin situation solved in two possible ways: Either by
properly protecting the condition variable using a mutex, or by
increasing the timeout-time on each timeout instead of relying on
squid_curtime.
* Use a 50 msec select timeout for ASYNC_IO to keep things flowing
nicely.
* Check for completed threads when the request queue grows.
Completed requests are put on a FIFO queue until processed from the
main loop. This is done to more quickly reuse of finished
threads.
* Fixed a silly bug in my last version of this patch. No idea how
the last patch could pass my tests...
* Avoid pointer aliasing. Some compilers/optimisations have trouble
with this (the old code was probably safe, but..).
* Some minor code cleanups.
* This patch is not messed up ;-)
* Removed compiler warnings
* No more SIGCONT signal hack or cross-level hints. This was a bad
move both on performance and code design.
* Mutex signalling is optional (-DAIO_PROPER_MUTEX). Using a
volatile pointer should be safe on most/all platforms.
This patch is quite heavily tested, and seems to perform well.
I still haven't found the cause to another async-io problem. When
async-io is enabled Squid only caches about 1/2 of the requests in my
tests. Without async-io everything gets cached as expected. I have
verified that this problem in present in a unpatched b20-1 and is not
caused by this patch or any of the other 1.2b20-1 changes I have made.
wessels [Thu, 21 May 1998 03:47:44 +0000 (03:47 +0000)]
From: Stewart Forster <slf@connect.com.au>
This is the final patch that I decided upon that avoids extra system
calls (ie. faster).
It adds two extra flags, FD_NOLINGER, and FD_NONBLOCKING to allow
for easy testing of these conditions when deciding what to do in comm_close().
It also allows for easy changing of the doaioclose test in the future when
it's decided what actually takes precedence.
wessels [Fri, 15 May 1998 22:58:33 +0000 (22:58 +0000)]
- Don't need eventDelete() calls because event handlers now use cbdata
- Don't call netdbExchangeStart for MULTICAST peers
- Try to get average RTT's for multicast peers
- Need to cbdataAdd(psstate) for multicast counting
wessels [Fri, 15 May 1998 20:35:48 +0000 (20:35 +0000)]
FUM errors. we're accessing 'sc' after it gets freed by a callback.
Wrapping storeClientCopy2() with cbdataLock/Unlock should prevent
it from being freed until the end of this function.
Gross solution.
wessels [Fri, 15 May 1998 02:47:59 +0000 (02:47 +0000)]
Added weights to event structure. We need to run ALL
"lightweight" events like peerPingTimeout and storeClientCopyEvent
instead of just one event per call from the select loop
wessels [Thu, 14 May 1998 22:33:47 +0000 (22:33 +0000)]
Transitioning Cache Digests from "experimental" to fundamental.
Removed a lot of stats collection, espeically large histograms.
Made peerDigestInit() called from an event, instead of being
called directly -- this avoids some recursion.
The selection algorithm is still kind of hard coded as follows:
cache digests
netdb (if CD's miss)
ICP (if netdb has no RTT data)
wessels [Thu, 14 May 1998 03:29:37 +0000 (03:29 +0000)]
cleaned up storeSwapInFileOpened, especially for failure cases.
Call storeReleaseRequest() directly from here to be sure the
bad object gets thrown out.
wessels [Wed, 13 May 1998 02:16:32 +0000 (02:16 +0000)]
eventAdd, eventRun, et al. now check cbdata before making a callback.
If the 'arg' pointer becomes invalid, then the event is NOT run.
Events with NULL 'arg's are always run.
rousskov [Tue, 12 May 1998 00:44:23 +0000 (00:44 +0000)]
- Added binary http headers to requests
- request_t objects are now created and destroyed in a consistent way
- Fixed cache control printf bug
- Added a lot of new http header ids
- Improved Connection: header handling; now both Connection and
Proxy-Connection headers are checked
- Connection request header is now handled correctly regardless
of its position and the number of entries
- Better handling of persistent connection "clues" in HTTP headers
- Removed handling of "length=" directive in IMS headers;
the directive is not in the HTTP/1.1 standard;
standing by for objections
- allowed/denied headers are now checked using bit masks instead of
strcmp loops
- removed Uri: from allowed headers; Uri is deprecated in RFC 2068
- removed processing of Request-Range header (no in specs?)
note: binary headers for requests are not completed:
request_t still keeps and ascii image of the headers
wessels [Sat, 9 May 1998 04:51:03 +0000 (04:51 +0000)]
From: Henrik Nordstrom <hno@hem.passagen.se>
Here is a polished and updated test suite a bit..
* pconn-banger reports a throughtput report, like tcp-banger2
* both tools include support to validate size and a simple checksum
* A couple of pconn-banger bugs fixed.
* Wrote a small perl script that joins a URL list, and a size-checksum
report from tcp-banger to a combined list (needed to use the validation
feature).
Syntax for URL lists is eiter plain 1 URL/line, or
METHOD URL [Request-File|-] [size checksum]
The tools can send HTTP requests with any method or request-body, but
they do not (yet) support HEAD replies.