]> err.no Git - varnish/log
varnish
18 years agoThe buckets_per_mutex parameter was removed in r813.
des [Sat, 16 Sep 2006 10:36:23 +0000 (10:36 +0000)]
The buckets_per_mutex parameter was removed in r813.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1004 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoUse generic param setting stuff
phk [Sat, 16 Sep 2006 09:49:51 +0000 (09:49 +0000)]
Use generic param setting stuff

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1003 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMake the listen depth a paramter.
phk [Sat, 16 Sep 2006 09:38:09 +0000 (09:38 +0000)]
Make the listen depth a paramter.

Clean up the paramter stuff even more.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1002 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd -p param=value command line argument.
phk [Sat, 16 Sep 2006 09:06:45 +0000 (09:06 +0000)]
Add -p param=value command line argument.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1001 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoGeneralize parameter setting at start up.
phk [Sat, 16 Sep 2006 09:01:21 +0000 (09:01 +0000)]
Generalize parameter setting at start up.

Give the managers main a struct cli and use that to call into
the paramter stuff for setting listen address.  More params to follow.

When setting the listen address, check that getaddrinfo() doesn't
hate it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1000 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoOpen and close the listen socket when we start and stop the child.
phk [Sat, 16 Sep 2006 08:20:39 +0000 (08:20 +0000)]
Open and close the listen socket when we start and stop the child.

Make the listen address a parameter.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@999 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRename the config.* CLI command family to vcl.*. It is more intuitive
phk [Sat, 16 Sep 2006 07:49:35 +0000 (07:49 +0000)]
Rename the config.* CLI command family to vcl.*.  It is more intuitive
that way and we may eventually want a config file for varnishd to
control obscure parameters.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@998 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMake the shmlog'ing of vcl execution a parameter.
phk [Sat, 16 Sep 2006 07:44:15 +0000 (07:44 +0000)]
Make the shmlog'ing of vcl execution a parameter.

VCL tracing is responsible for a very large fraction of the shmlog
records and will generally only be used for debugging of VCL code.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@997 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd a base64 decoder.
phk [Fri, 15 Sep 2006 19:25:06 +0000 (19:25 +0000)]
Add a base64 decoder.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@996 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoEliminate the session_grace thing, the inter-request interval is to
phk [Fri, 15 Sep 2006 16:18:27 +0000 (16:18 +0000)]
Eliminate the session_grace thing, the inter-request interval is to
large in general (think RTT) for this to make sense, it costs a syscall
and if a delay is used, at least two context switches.

We still capture sessions that do pipe-line avoiding the context switch
in that case, without incurring the syscall overhead.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@995 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRemove the SessionReuse shmem tag, we have little or no benefit from
phk [Fri, 15 Sep 2006 16:10:15 +0000 (16:10 +0000)]
Remove the SessionReuse shmem tag, we have little or no benefit from
knowing this at the end of a request.

Instead put the address + port in the ReqStart shmtag where it does
a lot of good.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@994 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDisable session_grace for now.
phk [Fri, 15 Sep 2006 10:30:27 +0000 (10:30 +0000)]
Disable session_grace for now.

It is not clear if this is a benefit or not.  There seems to be a significant
(100msec ?) inter-request gap and seeting the grace period that long
means tying up worker threads doing basically nothing.

Setting a short timeout (10msec) results in an extra system call which
practically never does anything good.

Unless benefit is shown, this stuff should be removed again.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@993 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agofix more stats
phk [Fri, 15 Sep 2006 10:24:49 +0000 (10:24 +0000)]
fix more stats

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@992 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix stats.
phk [Fri, 15 Sep 2006 10:23:34 +0000 (10:23 +0000)]
Fix stats.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@991 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd missing SessionReuse log entries
phk [Fri, 15 Sep 2006 10:03:24 +0000 (10:03 +0000)]
Add missing SessionReuse log entries

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@990 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoImprove portability: Since all log strings are NUL terminated we do not
phk [Fri, 15 Sep 2006 10:01:45 +0000 (10:01 +0000)]
Improve portability: Since all log strings are NUL terminated we do not
need to use REG_STARTEND any more.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@989 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAllow session_grace to be set to zero
phk [Fri, 15 Sep 2006 09:54:52 +0000 (09:54 +0000)]
Allow session_grace to be set to zero

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@988 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoTry to avoid sending EOF'ed or ready sessions to the herder.
phk [Fri, 15 Sep 2006 09:43:56 +0000 (09:43 +0000)]
Try to avoid sending EOF'ed or ready sessions to the herder.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@987 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd XXX comment
phk [Fri, 15 Sep 2006 08:48:13 +0000 (08:48 +0000)]
Add XXX comment

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@986 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoPrint '-' if we don't have an IP# on startup.
phk [Fri, 15 Sep 2006 08:43:39 +0000 (08:43 +0000)]
Print '-' if we don't have an IP# on startup.

Also skip IP# from SessionReuse records.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@985 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix sendfile() on Linux:
des [Fri, 15 Sep 2006 08:14:36 +0000 (08:14 +0000)]
Fix sendfile() on Linux:

 - use the correct headers
 - don't duplicate WRK_Flush()
 - pass the offset correctly

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@984 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAvoid parking a worker thread on trailing space
phk [Fri, 15 Sep 2006 08:08:28 +0000 (08:08 +0000)]
Avoid parking a worker thread on trailing space

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@983 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoIf after handling a request we find anything in our input buffer,
phk [Fri, 15 Sep 2006 07:37:20 +0000 (07:37 +0000)]
If after handling a request we find anything in our input buffer,
don't waste time putting the session on the herder, but go right
back and take the next request in the current worker thread.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@982 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoOverhaul NCSA logging.
phk [Fri, 15 Sep 2006 07:14:37 +0000 (07:14 +0000)]
Overhaul NCSA logging.

Reduce memory footprint by only allocating space for a fd first time
we see it.  Few if any servers will ever see 64k fd's in use.

Move the sbuf into the logline structure for simplicity.

Access the logline structure through a pointer instead of indexing
the array all the time.

Reduce amount of malloc/free traffic for performance.

Use the "cooked" SHMlog api where the length, fd, etc are broken out
as arguments for us.  Pass the FILE* where we want the stuff to
go as private data (stdout for now).

Add FlexeLint files.

Now over to Anders again...

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@981 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFixed timestamp so thats it's correct. PHK added a new variable to ReqEnd that contai...
andersb [Wed, 13 Sep 2006 21:26:01 +0000 (21:26 +0000)]
Fixed timestamp so thats it's correct. PHK added a new variable to ReqEnd that contains a correct endtime.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@980 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd the end time as timestamp to the ReqEnd SHM record.
phk [Wed, 13 Sep 2006 20:43:14 +0000 (20:43 +0000)]
Add the end time as timestamp to the ReqEnd SHM record.

Vector failures of the the FIRST case via DONE as well to
avoid code duplication.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@979 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDike out Linux senfile, it doesn't work.
phk [Wed, 13 Sep 2006 19:07:52 +0000 (19:07 +0000)]
Dike out Linux senfile, it doesn't work.

Isolated by: Xing Li <xing@litespeedtech.com>

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@978 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDouble the default workspace for the benefit of Blackberris and other
phk [Tue, 12 Sep 2006 21:21:36 +0000 (21:21 +0000)]
Double the default workspace for the benefit of Blackberris and other
low-bandwidth devices which for some reason include their entire
lifehistory in the HTTP requests.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@977 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMade the code more robust but fixing a bug that caused coredumps. Haven't seen dumps...
andersb [Tue, 12 Sep 2006 21:02:09 +0000 (21:02 +0000)]
Made the code more robust but fixing a bug that caused coredumps. Haven't seen dumps after fix.

Cleared some unused variables.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@976 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDistinguish the explanation for the first request from the one used
phk [Tue, 12 Sep 2006 20:50:19 +0000 (20:50 +0000)]
Distinguish the explanation for the first request from the one used
on subsequent requests.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@975 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix timestamps in shm tag StatSess for sessions with no requests.
phk [Tue, 12 Sep 2006 20:17:35 +0000 (20:17 +0000)]
Fix timestamps in shm tag StatSess for sessions with no requests.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@974 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agochunksize is in kilobytes
phk [Tue, 12 Sep 2006 20:06:55 +0000 (20:06 +0000)]
chunksize is in kilobytes

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@973 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoThere may be error returns from kevent, don't assert there are none.
phk [Tue, 12 Sep 2006 19:41:52 +0000 (19:41 +0000)]
There may be error returns from kevent, don't assert there are none.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@972 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoImplement sendfile() support for Linux.
des [Tue, 12 Sep 2006 10:12:34 +0000 (10:12 +0000)]
Implement sendfile() support for Linux.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@971 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agofix typo
phk [Tue, 12 Sep 2006 09:38:28 +0000 (09:38 +0000)]
fix typo

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@970 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoGetting somewhere. I now have a "full" logline. Apart from writing usernames caught...
andersb [Mon, 11 Sep 2006 23:30:07 +0000 (23:30 +0000)]
Getting somewhere. I now have a "full" logline. Apart from writing usernames caught by the auth header, the logline is complete.
I have now cleared up my obvious memoryleaks also.

The code looks like it has been through a shredder, and needs massive cleaning before alpha.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@969 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoIf we have more threads than the max, kill one if we can.
phk [Mon, 11 Sep 2006 17:18:31 +0000 (17:18 +0000)]
If we have more threads than the max, kill one if we can.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@968 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoremember to close pipes
phk [Mon, 11 Sep 2006 15:12:05 +0000 (15:12 +0000)]
remember to close pipes

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@967 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoUse a pipe for synchronization instead.
phk [Mon, 11 Sep 2006 14:50:56 +0000 (14:50 +0000)]
Use a pipe for synchronization instead.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@966 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRedo the worker thread pool locking a bit, all the while cursing
phk [Mon, 11 Sep 2006 14:34:48 +0000 (14:34 +0000)]
Redo the worker thread pool locking a bit, all the while cursing
pthreads deficient API design for it's shortcomings.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@965 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoEmbellish the mutex debugging a bit
phk [Mon, 11 Sep 2006 12:00:50 +0000 (12:00 +0000)]
Embellish the mutex debugging a bit

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@964 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMove LOCK/UNLOCK macros to cache.h where they belong.
phk [Mon, 11 Sep 2006 11:55:00 +0000 (11:55 +0000)]
Move LOCK/UNLOCK macros to cache.h where they belong.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@963 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoIgnore kevent error return entries
phk [Mon, 11 Sep 2006 10:35:26 +0000 (10:35 +0000)]
Ignore kevent error return entries

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@962 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoOnly expire when the timer fires
phk [Mon, 11 Sep 2006 10:16:02 +0000 (10:16 +0000)]
Only expire when the timer fires

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@961 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoPiggy-back kevent changes on kevent wait call
phk [Mon, 11 Sep 2006 10:14:45 +0000 (10:14 +0000)]
Piggy-back kevent changes on kevent wait call

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@960 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAvoid a startup-race
phk [Mon, 11 Sep 2006 10:14:29 +0000 (10:14 +0000)]
Avoid a startup-race

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@959 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoCleaned up User-Agent and Referer. Both should now work correct. As far as I can...
andersb [Mon, 11 Sep 2006 09:35:43 +0000 (09:35 +0000)]
Cleaned up User-Agent and Referer. Both should now work correct. As far as I can see, I only have the timestamp left for a sane loggline.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@958 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoCheck for sendfile().
des [Mon, 11 Sep 2006 09:16:59 +0000 (09:16 +0000)]
Check for sendfile().

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@957 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoReduce syscall footprint of expiry and hangman
phk [Mon, 11 Sep 2006 09:14:29 +0000 (09:14 +0000)]
Reduce syscall footprint of expiry and hangman

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@956 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAvoid a clock_gettime() call
phk [Mon, 11 Sep 2006 09:05:39 +0000 (09:05 +0000)]
Avoid a clock_gettime() call

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@955 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agobraino in last commit.
phk [Mon, 11 Sep 2006 09:00:44 +0000 (09:00 +0000)]
braino in last commit.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@954 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoSave more time() calls
phk [Mon, 11 Sep 2006 08:58:42 +0000 (08:58 +0000)]
Save more time() calls

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@953 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoA avoid a time(NULL) call
phk [Mon, 11 Sep 2006 08:53:53 +0000 (08:53 +0000)]
A avoid a time(NULL) call

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@952 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDo stats on sendfile/write split.
phk [Mon, 11 Sep 2006 08:42:35 +0000 (08:42 +0000)]
Do stats on sendfile/write split.

Add param for minimum size of object before we will sendfile it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@951 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoStarted to fix output of User-Agent. It was all over the place. Found what I was...
andersb [Sun, 10 Sep 2006 22:23:59 +0000 (22:23 +0000)]
Started to fix output of User-Agent. It was all over the place. Found what I was doing wrong and fixed it.

Should work with correct User-Agent now.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@950 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMake the fetchers chunksize a parameter, but keep the default at 128k
phk [Fri, 8 Sep 2006 06:47:55 +0000 (06:47 +0000)]
Make the fetchers chunksize a parameter, but keep the default at 128k

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@949 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd an extra bucket and make it clear how the number was chosen.
phk [Fri, 8 Sep 2006 05:58:33 +0000 (05:58 +0000)]
Add an extra bucket and make it clear how the number was chosen.

Remove extra sanitychecking.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@948 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMissing commit message from previous commit:
phk [Thu, 7 Sep 2006 10:14:43 +0000 (10:14 +0000)]
Missing commit message from previous commit:

Fix a logic bug which allowed storage objects to be trampled on:
the last bucket may contain object smaller than we want.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@947 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoHandle zero length storage objects correctly: Don't let them exist.
phk [Thu, 7 Sep 2006 10:12:54 +0000 (10:12 +0000)]
Handle zero length storage objects correctly:  Don't let them exist.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@946 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoInsert a bunch of asserts to try to catch anything going wrong
phk [Thu, 7 Sep 2006 08:25:05 +0000 (08:25 +0000)]
Insert a bunch of asserts to try to catch anything going wrong

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@945 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoPick up uint32_t from <stdint.h> instead of <sys/types.h>
phk [Thu, 7 Sep 2006 08:01:14 +0000 (08:01 +0000)]
Pick up uint32_t from <stdint.h> instead of <sys/types.h>

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@944 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoLogging for status & response was swapped for generated errors.
phk [Thu, 7 Sep 2006 07:50:48 +0000 (07:50 +0000)]
Logging for status & response was swapped for generated errors.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@943 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRemove debugging messages.
phk [Thu, 7 Sep 2006 07:33:23 +0000 (07:33 +0000)]
Remove debugging messages.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@942 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd stats counters for large and small free fragments.
phk [Thu, 7 Sep 2006 07:27:21 +0000 (07:27 +0000)]
Add stats counters for large and small free fragments.

Remove debugging

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@941 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoremove "age", it was effectively unused. Revisit the idea later.
phk [Thu, 7 Sep 2006 07:17:31 +0000 (07:17 +0000)]
remove "age", it was effectively unused.  Revisit the idea later.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@940 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDon't clear alloc, it will be done in due time.
phk [Thu, 7 Sep 2006 07:12:18 +0000 (07:12 +0000)]
Don't clear alloc, it will be done in due time.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@939 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoSplit the freelist by size.
phk [Thu, 7 Sep 2006 07:09:37 +0000 (07:09 +0000)]
Split the freelist by size.

Use 32 buckets for now, with a 4k pagesize that takes us to 128k
which matches the fetchers default chunksize.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@938 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRemove debug entry
phk [Thu, 7 Sep 2006 05:41:13 +0000 (05:41 +0000)]
Remove debug entry

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@937 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRead more than one session pointer at a time from the pipe and
phk [Thu, 7 Sep 2006 05:40:09 +0000 (05:40 +0000)]
Read more than one session pointer at a time from the pipe and
handle them all with one kevent call.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@936 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDon't use binary address anyway, we only want the IP number part
phk [Wed, 6 Sep 2006 22:09:32 +0000 (22:09 +0000)]
Don't use binary address anyway, we only want the IP number part
and splitting that out of the binary part is not worth the
trouble.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@935 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAccount for header bytes in error and 304 responses.
phk [Wed, 6 Sep 2006 22:02:07 +0000 (22:02 +0000)]
Account for header bytes in error and 304 responses.

Remove unhelpful debug entry.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@934 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMove some setup code to first state now that we have it.
phk [Wed, 6 Sep 2006 21:52:50 +0000 (21:52 +0000)]
Move some setup code to first state now that we have it.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@933 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMove a bunch of work from the acceptor thread to the worker thread
phk [Wed, 6 Sep 2006 21:41:13 +0000 (21:41 +0000)]
Move a bunch of work from the acceptor thread to the worker thread
for better scaling.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@932 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMove CRC32 into libvarnish
phk [Wed, 6 Sep 2006 21:15:26 +0000 (21:15 +0000)]
Move CRC32 into libvarnish

Use it for hashing srcaddr as well.  Hash the sockaddr instead
of the ascii representation.

Add a primitive mutex tracking facility which writes debug
records to the shmlog if enabled.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@931 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoGive the stats summation its own mutex
phk [Wed, 6 Sep 2006 20:45:49 +0000 (20:45 +0000)]
Give the stats summation its own mutex

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@930 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoReduce traffic on the wrk_mtx, saving some syscalls along the way:
phk [Wed, 6 Sep 2006 19:35:33 +0000 (19:35 +0000)]
Reduce traffic on the wrk_mtx, saving some syscalls along the way:

Make a thread-reaper-thread which examines the tail end of the queue
and kicks threads which are too old so the wake up and die.

This allows us to assume that a thread on the free queue is always
waiting on its condvar, so we don't need to hold the mutex when we
signal the condvar.

As a result, the woken thread stands a chance to grab the mutex
and a little song and dance between the two threads is avoided.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@929 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoGrab the r_recv timestamp at the right time.
phk [Wed, 6 Sep 2006 19:08:06 +0000 (19:08 +0000)]
Grab the r_recv timestamp at the right time.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@928 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoDon't bother with SO_NOSIGPIPE, it doesn't always work and we
phk [Wed, 6 Sep 2006 18:47:06 +0000 (18:47 +0000)]
Don't bother with SO_NOSIGPIPE, it doesn't always work and we
have ignored the signal anyway.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@927 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoRemove unused timestamp "t0" and save a syscall per request.
phk [Wed, 6 Sep 2006 18:46:26 +0000 (18:46 +0000)]
Remove unused timestamp "t0" and save a syscall per request.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@926 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoSave a systemcall by using the same timestamp twice.
phk [Wed, 6 Sep 2006 18:37:17 +0000 (18:37 +0000)]
Save a systemcall by using the same timestamp twice.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@925 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoGive pool threads 120 second timeout, 10 was close to silly.
phk [Wed, 6 Sep 2006 18:32:05 +0000 (18:32 +0000)]
Give pool threads 120 second timeout, 10 was close to silly.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@924 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix the poll acceptor, we need to cache the fd as sp->fd might
phk [Wed, 6 Sep 2006 18:23:24 +0000 (18:23 +0000)]
Fix the poll acceptor, we need to cache the fd as sp->fd might
change to -1 under us.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@923 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix buglet in -i/-x name matching
phk [Wed, 6 Sep 2006 11:21:40 +0000 (11:21 +0000)]
Fix buglet in -i/-x name matching

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@922 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAllow '-' in identifiers.
phk [Wed, 6 Sep 2006 10:45:55 +0000 (10:45 +0000)]
Allow '-' in identifiers.

For further study: should we accept RFC2616's definition of "token" ?

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@921 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoMark responses with Set-Cookie as "pass"
phk [Wed, 6 Sep 2006 09:58:24 +0000 (09:58 +0000)]
Mark responses with Set-Cookie as "pass"

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@920 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdd support for inspecting response headers.
phk [Wed, 6 Sep 2006 09:54:49 +0000 (09:54 +0000)]
Add support for inspecting response headers.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@919 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix the same issue as in the kqueue acceptor: By the time we get
phk [Wed, 6 Sep 2006 09:18:06 +0000 (09:18 +0000)]
Fix the same issue as in the kqueue acceptor:  By the time we get
here the filedescriptor may already be closed, so accept EBADF.

Reported by: Xing Li <xing@litespeedtech.com>

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@918 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoFix a bug in chunked fetching:
phk [Wed, 6 Sep 2006 07:37:34 +0000 (07:37 +0000)]
Fix a bug in chunked fetching:

With very short chunks, in this case 3 characters, our buffer may
contain not only the chunk length and the chunk data, but also the
next chunk length.

If the short chunk is the last chunk before the zero length chunk
at the end, unconditionally trying to fill the buffer before parsing
the length may hang because we already have everything there is to
have in the buffer.

The fix is to always try to parse the buffer before adding to it.

While here, tighten up and improve error checks of the code.

Reported by: Xing Li <xing@litespeedtech.com>

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@917 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoescape control characters in SLT_Debug as %XX
phk [Wed, 6 Sep 2006 06:39:52 +0000 (06:39 +0000)]
escape control characters in SLT_Debug as %XX

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@916 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoAdded more outputdata, fixed memory leaks (I think).
andersb [Tue, 5 Sep 2006 22:11:05 +0000 (22:11 +0000)]
Added more outputdata, fixed memory leaks (I think).

Code still not Alpha ready, but I think most concepts work now.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@915 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoGo through all asserts and mark those which indicate missing code with
phk [Thu, 24 Aug 2006 07:57:07 +0000 (07:57 +0000)]
Go through all asserts and mark those which indicate missing code with
xxx or XXX.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@914 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoIntroduce LOCK() and UNLOCK() macros which does the right thing
phk [Thu, 24 Aug 2006 07:17:35 +0000 (07:17 +0000)]
Introduce LOCK() and UNLOCK() macros which does the right thing
with pthread_mutex_{lock,unlock}()

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@913 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoGive xxxasserts their own backend with a different message.
phk [Thu, 24 Aug 2006 07:10:35 +0000 (07:10 +0000)]
Give xxxasserts their own backend with a different message.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@912 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoSplit assert into "static check" and "missing code" variants.
phk [Thu, 24 Aug 2006 06:58:37 +0000 (06:58 +0000)]
Split assert into "static check" and "missing code" variants.

The "missing code" variants have xxx prefix

Introduce AN() (assert non-null) variant as well.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@911 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoThis is a workaround for what is probably a race in FreeBSD RELENG_6
phk [Thu, 24 Aug 2006 06:15:13 +0000 (06:15 +0000)]
This is a workaround for what is probably a race in FreeBSD RELENG_6
socket dismantling.

There is no way that close(2) should ever be able to return EINVAL,
but we've seen it.

Specifically assert on EBADF which is the check we're really after.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@910 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoHandle backend failure in pass mode
phk [Wed, 23 Aug 2006 14:30:06 +0000 (14:30 +0000)]
Handle backend failure in pass mode

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@909 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoThese are not used.
phk [Wed, 23 Aug 2006 13:11:14 +0000 (13:11 +0000)]
These are not used.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@908 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agodon't service cached objects the last second of their lifetime.
phk [Wed, 23 Aug 2006 12:10:11 +0000 (12:10 +0000)]
don't service cached objects the last second of their lifetime.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@907 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoSet response timestamp when we emit an error.
phk [Wed, 23 Aug 2006 11:42:16 +0000 (11:42 +0000)]
Set response timestamp when we emit an error.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@906 d4fa192b-c00b-0410-8231-f00ffab90ce4

18 years agoImplement error in miss also
phk [Wed, 23 Aug 2006 11:27:54 +0000 (11:27 +0000)]
Implement error in miss also

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@905 d4fa192b-c00b-0410-8231-f00ffab90ce4