rousskov [Thu, 28 May 1998 04:51:37 +0000 (04:51 +0000)]
- removed ascii headers from reply and request structures
- added more http headers
- fixed content of entity-headers array
- do not update headers with 304 that are not allowed by HTTP/1.1
- moved routines common for request and replies to HttpMsg.c
- rewrote clientBuildReply* and other client_side functions
using new header interface
- code cleanup
- do not cut off "; parameter" from "digitized" Content-Type
http fields
- Added X-Request-URI for persistent connection debugging
wessels [Thu, 28 May 1998 02:31:31 +0000 (02:31 +0000)]
Changes to comm_*_incoming()
Now, there is a single comm_incoming() function. This does NOT use
select/poll. It just calls the read handlers directly for HTTP
and ICP sockets, and relies on them to properly handle EWOULDBLOCK
and friends.
The rate at which comm_incoming gets called is configurable with
'incoming_min_rate' and 'incoming_max_rate'. Note, these are
kind of "backwards" (being rates) and they indicate how many
other FD's to process before calling comm_incoming(). When the load
is none or low, we call comm_incoming at the 'min_rate' which defaults
to once every 16 FDs. During high loads, 'max_rate' takes effect
and the default is every 2nd FD.
Also added a histogram to count how many connections/messages are
processed per call to comm_incoming. This also percipitated some
StatHist.c changes.
rousskov [Wed, 27 May 1998 05:45:32 +0000 (05:45 +0000)]
- Do not send only-if-cached cc directive with requests for peer's digests.
It does not allow fetching digests through neighbores.
We should send only-if-cached when Squid can handle 504 reply correctly.
wessels [Tue, 26 May 1998 23:37:23 +0000 (23:37 +0000)]
event times with 0.0 can "spin" the event queue until it runs
to completion. require a small, non-zero event time so that
other descriptors get a chance too
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.