]> err.no Git - varnish/log
varnish
15 years agoInitial checkin of a work in progress of the web GUI
petter [Fri, 12 Dec 2008 10:10:05 +0000 (10:10 +0000)]
Initial checkin of a work in progress of the web GUI

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

15 years agoAdd support for, and use a new syntax for terminating actions in VCL,
phk [Tue, 9 Dec 2008 13:54:09 +0000 (13:54 +0000)]
Add support for, and use a new syntax for terminating actions in VCL,
basically "return(action)" instead of just "action".

The previos syntax is still available.

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

15 years agoIncrease session workspace to 16k
phk [Mon, 8 Dec 2008 12:37:42 +0000 (12:37 +0000)]
Increase session workspace to 16k

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

15 years agoSilence debug noise
phk [Mon, 8 Dec 2008 10:16:25 +0000 (10:16 +0000)]
Silence debug noise

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

15 years agoImplement the cooling period before objhead's are deleted in the
phk [Mon, 8 Dec 2008 10:03:31 +0000 (10:03 +0000)]
Implement the cooling period before objhead's are deleted in the
critbit hasher.

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

15 years agoResolve the remove/lookup race the simple way.
phk [Wed, 3 Dec 2008 16:40:45 +0000 (16:40 +0000)]
Resolve the remove/lookup race the simple way.

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

15 years agoAnd as always I forgot to svn add the new file...
phk [Wed, 3 Dec 2008 10:50:04 +0000 (10:50 +0000)]
And as always I forgot to svn add the new file...

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

15 years agoAdd preliminary version of lock-less tree based lookup (see below)
phk [Wed, 3 Dec 2008 10:49:34 +0000 (10:49 +0000)]
Add preliminary version of lock-less tree based lookup (see below)

Enable SHA256 digests by default, and put it in the objhead.  This
increases the size of the objhead by 32 bytes, but may drop
a bit again later, when other now unnecessary fields go away.

Test SHA256 for correct operation on startup.

About the "critbit" lookup:

To enable this, use "-hcritbit" argument.

"Crit Bit" trees, are also known under various other names, the original
version of the idea is probably the PATRICIA tree.

The basic concept is a tree structure which has nodes only where necessary
to tell the indices apart.

Our version of it, has some additional bells and whistles.

First lookups do not require any locks until we reach the objhead
we were looking for, or until we need to insert one which wasn't
there.

Second, the branch nodes are part of the objhead, as all but the
very first will need one, this saves malloc operations big time.

Now the down-sides:

There are still missing bits, amongst these the "cooling off" list,
for objheads that have been dereferenced, but where the branch-node
is not.  Currently we just leak that memory.

There is a race relating to node deref and unlocked lookup that is
not closed, weird things may happen until I fix it.

I'd be interested to hear how long it survives before it croaks,
but apart from that, would not advocate that you use it, until
I fix those remaining issues.

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

15 years agoWrap some long lines
phk [Wed, 3 Dec 2008 10:39:15 +0000 (10:39 +0000)]
Wrap some long lines

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

15 years agoFix an embarrasing bug in my Flexlinting of this code yesterday, and
phk [Tue, 2 Dec 2008 20:48:11 +0000 (20:48 +0000)]
Fix an embarrasing bug in my Flexlinting of this code yesterday, and
add a couple of test-vectors to avoid it happening again.

And now for the funny and educational story:

In july of 1994, I added the "libmd" to FreeBSD, containing the
MD2, MD4 and MD5 functions from RFC 1319, RFC 1186 and RFC1321.

I meticulously replicated the test-vectors from the RFCs, so that
"make test" would validate the result.

Duing the intermediate 14 years, various slight shifts and adjustments
to things like the make(1) programs defaults, the shared library
resolution algorithm and other totally unrelated things, meant that
"make test" now tests the installed version of the library, rather
than the version you just built with "make all".

Needless to say, when I tested my patch yesterday, I didn't install
the built version, wanting first to hear what Colin Percival, FreeBSD
Security Wiz, generally swell fella and the guy who wrote this
SHA256 implementation, thought of these "stylistic" patches.

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

15 years agoFix build on !FreeBSD systems.
phk [Mon, 1 Dec 2008 22:17:37 +0000 (22:17 +0000)]
Fix build on !FreeBSD systems.

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

15 years agoVarious minor cleanups while we wait...
phk [Mon, 1 Dec 2008 21:46:20 +0000 (21:46 +0000)]
Various minor cleanups while we wait...

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

15 years agoShut FlexeLint up about SHA256 implementation.
phk [Mon, 1 Dec 2008 21:34:53 +0000 (21:34 +0000)]
Shut FlexeLint up about SHA256 implementation.

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

15 years agoWe cannot gain a reference to an object unless it has an objhead,
phk [Mon, 1 Dec 2008 20:24:46 +0000 (20:24 +0000)]
We cannot gain a reference to an object unless it has an objhead,
assert that we have one.

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

16 years agoSupress stats in the curses mode until we have see a non-zero value.
phk [Mon, 1 Dec 2008 14:13:49 +0000 (14:13 +0000)]
Supress stats in the curses mode until we have see a non-zero value.

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

16 years agoAlways release WRW, also on error.
phk [Wed, 26 Nov 2008 16:10:19 +0000 (16:10 +0000)]
Always release WRW, also on error.

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

16 years agoAdd asserts to find where WRW is leaking in ticket 390
phk [Wed, 26 Nov 2008 12:05:44 +0000 (12:05 +0000)]
Add asserts to find where WRW is leaking in ticket 390

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

16 years agoAdd code to calculate a SHA256 over the hash string if param hash_sha256
phk [Tue, 25 Nov 2008 16:04:47 +0000 (16:04 +0000)]
Add code to calculate a SHA256 over the hash string if param hash_sha256
is set.

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

16 years agoMake it possible to declare paramters in other source files, and move
phk [Tue, 25 Nov 2008 14:09:39 +0000 (14:09 +0000)]
Make it possible to declare paramters in other source files, and move
the thread-pool related params into a new file mgt_pool.c as proof.

The paramters happen in management process context, and should therefore
not end up in cache_* files for namespace and sanity reasons.

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

16 years agoName that file "vparam.h" instead of "param.h" which is just too
phk [Tue, 25 Nov 2008 13:44:52 +0000 (13:44 +0000)]
Name that file "vparam.h" instead of "param.h" which is just too
generic for comfort.

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

16 years agoMove parameter declaration into a .h file of its own.
phk [Tue, 25 Nov 2008 13:42:40 +0000 (13:42 +0000)]
Move parameter declaration into a .h file of its own.

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

16 years agoSort the parameters alphabetically, it's too hard to find anything right
phk [Tue, 25 Nov 2008 13:39:15 +0000 (13:39 +0000)]
Sort the parameters alphabetically, it's too hard to find anything right
now.

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

16 years agoTry to get the endianess optimization working, by including an assortment
phk [Tue, 25 Nov 2008 12:02:10 +0000 (12:02 +0000)]
Try to get the endianess optimization working, by including an assortment
of possibly relevant headers and only go with the fast path if we have
credible information that this is a big-endian platform.

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

16 years agoNeuther the FreeBSD specifics of SHA256 implementation.
phk [Tue, 25 Nov 2008 11:45:59 +0000 (11:45 +0000)]
Neuther the FreeBSD specifics of SHA256 implementation.

In the end, it comes down to lack of POSIX definition of a way to find
out byte-endianess, sigh...

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

16 years agoAdd a parameter to enable SHA256 hashing.
phk [Tue, 25 Nov 2008 11:09:38 +0000 (11:09 +0000)]
Add a parameter to enable SHA256 hashing.

This does not do anything yet.

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

16 years agoHook SHA256 into the build
phk [Tue, 25 Nov 2008 11:07:39 +0000 (11:07 +0000)]
Hook SHA256 into the build

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

16 years agoAdd SHA256 hashing code.
phk [Tue, 25 Nov 2008 11:07:19 +0000 (11:07 +0000)]
Add SHA256 hashing code.

This code was written by Colin Percival for the FreeBSD project.

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

16 years agoIsolate some hash-string building nastyness in cache_hash.c
phk [Tue, 25 Nov 2008 10:20:16 +0000 (10:20 +0000)]
Isolate some hash-string building nastyness in cache_hash.c

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

16 years agoWhen we receive an If-Modified-Since on an ESI object, do not process the conditional
phk [Tue, 25 Nov 2008 08:37:34 +0000 (08:37 +0000)]
When we receive an If-Modified-Since on an ESI object, do not process the conditional
for the child object and pretend to send a 304 reply for them, if we have decided to
deliver the main object.

Fixes #386

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

16 years agoLog debugs with correct id
phk [Mon, 24 Nov 2008 20:21:51 +0000 (20:21 +0000)]
Log debugs with correct id

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

16 years agoControl the ESI parsing debug records with the esi_syntax bitmap parameter.
phk [Mon, 24 Nov 2008 19:44:36 +0000 (19:44 +0000)]
Control the ESI parsing debug records with the esi_syntax bitmap parameter.

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

16 years agoInclude relevant bit of ansidecl.h directly
tfheen [Mon, 24 Nov 2008 19:08:36 +0000 (19:08 +0000)]
Include relevant bit of ansidecl.h directly

Avoids build-dependency on binutils-dev

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

16 years agoRename the write-buffering functions to WRW_*().
phk [Mon, 24 Nov 2008 17:47:21 +0000 (17:47 +0000)]
Rename the write-buffering functions to WRW_*().

Make reservation and release explicit.

Add asserts that this it happens.

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

16 years agoMake the maximum record length in the shm log a paramter "shm_reclen".
phk [Mon, 24 Nov 2008 15:53:26 +0000 (15:53 +0000)]
Make the maximum record length in the shm log a paramter "shm_reclen".

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

16 years agoOnly emit debug message for writes that fail
phk [Mon, 24 Nov 2008 14:41:36 +0000 (14:41 +0000)]
Only emit debug message for writes that fail

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

16 years agoFix typo (s/timeout/interval/) in default parameters for backend health
tfheen [Mon, 24 Nov 2008 14:04:42 +0000 (14:04 +0000)]
Fix typo (s/timeout/interval/) in default parameters for backend health

Thanks to Jonny @ globo for noticing.

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

16 years agoLog write errors under SLT_Debug.
phk [Mon, 24 Nov 2008 13:03:41 +0000 (13:03 +0000)]
Log write errors under SLT_Debug.

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

16 years agoUse == for comparison.
phk [Mon, 24 Nov 2008 12:30:29 +0000 (12:30 +0000)]
Use == for comparison.

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

16 years agoCount ESI processed objects in acct.bodybytes
phk [Mon, 24 Nov 2008 12:27:25 +0000 (12:27 +0000)]
Count ESI processed objects in acct.bodybytes

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

16 years agoDo not count chunked encoding headers in stat.hdrbytes.
phk [Mon, 24 Nov 2008 12:24:55 +0000 (12:24 +0000)]
Do not count chunked encoding headers in stat.hdrbytes.

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

16 years agoEliminate <vis.h> and it's compat version, it is unused.
phk [Mon, 24 Nov 2008 10:17:24 +0000 (10:17 +0000)]
Eliminate <vis.h> and it's compat version, it is unused.

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

16 years agoUpdate license to remove the advertising clause, reflecting similar change
phk [Mon, 24 Nov 2008 10:05:55 +0000 (10:05 +0000)]
Update license to remove the advertising clause, reflecting similar change
in the FreeBSD original.

Approved by: des

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

16 years agoFix typo
tfheen [Sat, 22 Nov 2008 01:35:16 +0000 (01:35 +0000)]
Fix typo

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

16 years agoAlso run the VCL->C compiler stage in a sub-process.
phk [Fri, 21 Nov 2008 13:00:35 +0000 (13:00 +0000)]
Also run the VCL->C compiler stage in a sub-process.

This isolates the mangement process from the compilers bugs
and memory usage.

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

16 years agoMake it possible to supress all or no lines of output
phk [Fri, 21 Nov 2008 12:53:34 +0000 (12:53 +0000)]
Make it possible to supress all or no lines of output

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

16 years agoSimplify how we manage the -f argument:
phk [Fri, 21 Nov 2008 12:09:46 +0000 (12:09 +0000)]
Simplify how we manage the -f argument:

The VCL file specified to -f must be read relative to the directory
from which varnishd is started, before we chdir to the workdir.

We used to deal with this by opening the file and passing the file
handle down.  It's simpler to just read the file and pass the actual
VCL code down.

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

16 years agoAdd a vreadfile() utility function, which reads a file into malloc'ed
phk [Fri, 21 Nov 2008 11:32:56 +0000 (11:32 +0000)]
Add a vreadfile() utility function, which reads a file into malloc'ed
memory

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

16 years agoMove the code for running stuff in a sub-process out to a library
phk [Fri, 21 Nov 2008 09:50:22 +0000 (09:50 +0000)]
Move the code for running stuff in a sub-process out to a library
function, and give it the ability to limit how many lines of
output we get back from the subprocess, in order to muzzle the
C-compiler somewhat.

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

16 years agoSoooorry.
petter [Fri, 21 Nov 2008 07:21:13 +0000 (07:21 +0000)]
Soooorry.

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

16 years agoAdded documentaiton on the timeouts
petter [Thu, 20 Nov 2008 11:01:26 +0000 (11:01 +0000)]
Added documentaiton on the timeouts

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

16 years agoVarious nits.
phk [Thu, 20 Nov 2008 10:19:56 +0000 (10:19 +0000)]
Various nits.

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

16 years agoClean up the ACL generation code a bit.
phk [Thu, 20 Nov 2008 10:03:53 +0000 (10:03 +0000)]
Clean up the ACL generation code a bit.

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

16 years agoCheck ECONNRESET
phk [Thu, 20 Nov 2008 08:50:56 +0000 (08:50 +0000)]
Check ECONNRESET

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

16 years agoCorrect defaults in varnishd.1
tfheen [Wed, 19 Nov 2008 16:26:16 +0000 (16:26 +0000)]
Correct defaults in varnishd.1

The defaults for thread_pool_min and thread_pools were wrong; fixed.

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

16 years agoAdded support for setting read timeouts for backend requests (first_byte_timeout...
petter [Wed, 19 Nov 2008 14:13:57 +0000 (14:13 +0000)]
Added support for setting read timeouts for backend requests (first_byte_timeout and between_bytes_timeout), in addition to make the connect_timeout available for the bereq object in vcl_miss and vcl_fetch.

first_byte_timeout is a read timeout from the connection to the backend is created to when the first byte arrives. It can be set as a parameter to varnish, as a field in the backend declaration or as bereq.first_byte_timeout in vcl_miss and vcl_pass.

between_bytes_timeout is a read timeout between each read from the backend. It can be set as a parameter to varnish, as a field in the backend declaration or as bereq.between_bytes_timeout in vcl_miss and vcl_pass.

The time unit for these timeout values are seconds. NOTE: The connect_timeout previously used milliseconds as time unit, so beware.

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

16 years agoKick the hash_slinger interface around a bit:
phk [Wed, 19 Nov 2008 11:58:48 +0000 (11:58 +0000)]
Kick the hash_slinger interface around a bit:

Isolate more stuff in hash_slinger.h.

Remove hash_slinger from cache.h, include in .c's as necessary.

Save a malloc per objhead by putting a few fields into the objhead
for the hash_slingers to use.

Preinitialize the refcount when we precreate the objhead.

Move the hash-string allocation into HSH_Copy(), no point in
duplication of mandatory step.

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

16 years agoMove the hash'ers refcount up to objhead, it is generic.
phk [Wed, 19 Nov 2008 10:21:30 +0000 (10:21 +0000)]
Move the hash'ers refcount up to objhead, it is generic.

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

16 years agoRename some objhead pointers from obj to oh for consistency.
phk [Wed, 19 Nov 2008 10:10:16 +0000 (10:10 +0000)]
Rename some objhead pointers from obj to oh for consistency.

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

16 years agoDocument grace
tfheen [Tue, 18 Nov 2008 20:53:03 +0000 (20:53 +0000)]
Document grace

Thanks to perbu for suggested documentation
Fixes 355

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

16 years agoMake malloc print max storage size
tfheen [Tue, 18 Nov 2008 13:29:34 +0000 (13:29 +0000)]
Make malloc print max storage size

storage_file prints the maximum storage size, make malloc do the same,
for consistency.

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

16 years agoRename variables to reflect that they are object heads, not objects.
phk [Mon, 17 Nov 2008 18:02:09 +0000 (18:02 +0000)]
Rename variables to reflect that they are object heads, not objects.

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

16 years agoFixed compiling on Linux with -Werror set. Added mising prototypes, removed an unused...
petter [Mon, 17 Nov 2008 13:31:37 +0000 (13:31 +0000)]
Fixed compiling on Linux with -Werror set. Added mising prototypes, removed an unused function and added the ATTRIBUTE_UNUSED to the attribute list for the rb_wrap() macro which generated unused functions.

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

16 years agosilence config.h noise
phk [Fri, 14 Nov 2008 10:22:47 +0000 (10:22 +0000)]
silence config.h noise

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

16 years agoRegenerated.
phk [Fri, 14 Nov 2008 09:50:12 +0000 (09:50 +0000)]
Regenerated.

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

16 years agoRetire VRT_re_test()
phk [Fri, 14 Nov 2008 09:49:28 +0000 (09:49 +0000)]
Retire VRT_re_test()

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

16 years agoInline VRT_re_test()
phk [Fri, 14 Nov 2008 09:48:57 +0000 (09:48 +0000)]
Inline VRT_re_test()

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

16 years agoMerge cache_vrt_acl.c into cache_vrt.c, one one-line function is silly
phk [Fri, 14 Nov 2008 09:18:23 +0000 (09:18 +0000)]
Merge cache_vrt_acl.c into cache_vrt.c, one one-line function is silly
in a source-file.

(All the work is done by vcc generated code now)

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

16 years agoRework the binary heap, we use for expiry processing, to deal more
phk [Fri, 14 Nov 2008 00:19:33 +0000 (00:19 +0000)]
Rework the binary heap, we use for expiry processing, to deal more
gracefully with large number of objects.

Previously we kept all objects in a single array which resultined
in increasingly infrequent but increasingly demanding calls to
calloc(3) with the consequent massive memory copies.  We also did
not release memory again if unused.

Now we stripe the array into rows of 64k objects each.

This number is a compromise between space wastage, max 1MB on a
64bit machine, and the desire to not add and delete rows all the
time.  With 64k objects in a row, even on a very busy server would
only add a new row every 5...10 seconds during ramp up.

Delete unused rows, but keep a hysteresis of an entire empty row
to avoid silly add-delete-add-delete-add-delete behaviour at row
boundaries.

Streamline some of the functions a bit.

Fixes #210

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

16 years agoFix this test-case to not rely on being able to compile /dev/null
phk [Tue, 11 Nov 2008 20:40:37 +0000 (20:40 +0000)]
Fix this test-case to not rely on being able to compile /dev/null
now that this is no longer possible.

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

16 years agoMake sure that
phk [Tue, 11 Nov 2008 20:22:05 +0000 (20:22 +0000)]
Make sure that
set obj.ttl = 0s
means that the object is not hit again by actually using "-1" instead.

This works around the rounding error which otherwise causes the object
to be inside TTL for up to one second - epsilon.

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

16 years agoRegression test case for ticket 365: restart in hit.
phk [Tue, 11 Nov 2008 19:07:30 +0000 (19:07 +0000)]
Regression test case for ticket 365: restart in hit.

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

16 years agoImplement restart in vcl_hit.
phk [Tue, 11 Nov 2008 19:06:55 +0000 (19:06 +0000)]
Implement restart in vcl_hit.

Fixes #365

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

16 years agoRemember to set lock "held" in CondWait
phk [Tue, 11 Nov 2008 13:43:01 +0000 (13:43 +0000)]
Remember to set lock "held" in CondWait

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

16 years agoHave I mentioned that I think POSIX is a bunch of amateurs ?
phk [Tue, 11 Nov 2008 13:38:09 +0000 (13:38 +0000)]
Have I mentioned that I think POSIX is a bunch of amateurs ?

There is no NULL value for pthread_t and you have to call a function
to compare them.

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

16 years agoReact to both NL and CR in VLU
phk [Tue, 11 Nov 2008 13:15:01 +0000 (13:15 +0000)]
React to both NL and CR in VLU

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

16 years agoRemember to add this file in second attempt :-)
phk [Mon, 10 Nov 2008 19:48:08 +0000 (19:48 +0000)]
Remember to add this file in second attempt :-)

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

16 years agoTake the full step and wrap all our mutex operations in proper C functions
phk [Mon, 10 Nov 2008 19:46:25 +0000 (19:46 +0000)]
Take the full step and wrap all our mutex operations in proper C functions
instead of increasingly unwieldy macros.

Amongst other things, this will make it much easier to do lock
profiling, contest statistics, asserts etc.

This commit is largely mechanically generated and should not result in
any changed functionality.

Locks retain the "mtx" monicker, as a reminder that they are mutexes.

No performance impact expected.

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

16 years agospecfile: 2.0.1-2 -> 2.0.2-1 and a changelog item for 2.0.2
ingvar [Mon, 10 Nov 2008 12:43:58 +0000 (12:43 +0000)]
specfile: 2.0.1-2 -> 2.0.2-1 and a changelog item for 2.0.2

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

16 years agoSpecfile: 2.0.1 > 2.0.2
ingvar [Mon, 10 Nov 2008 12:34:49 +0000 (12:34 +0000)]
Specfile: 2.0.1 >  2.0.2

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

16 years agoMake sure the VCL we try to load is a regular file
tfheen [Mon, 10 Nov 2008 11:55:17 +0000 (11:55 +0000)]
Make sure the VCL we try to load is a regular file

Fixes #368

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

16 years agoConstify vcl_tnames in .tcl script too
tfheen [Mon, 10 Nov 2008 11:55:15 +0000 (11:55 +0000)]
Constify vcl_tnames in .tcl script too

Change the .tcl script corresponding to r3364, fixes build failure

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

16 years agoAdd a test of the random director that uses actual randomness.
phk [Mon, 10 Nov 2008 09:40:39 +0000 (09:40 +0000)]
Add a test of the random director that uses actual randomness.

This will be skipped on platforms where srandom(1) does not result
in the same deterministic sequence of random numbers as on FreeBSD
and Linux.

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

16 years agoAdd a toplevel word which examines the sequence returned by
phk [Mon, 10 Nov 2008 09:37:21 +0000 (09:37 +0000)]
Add a toplevel word which examines the sequence returned by
srandom(1) and stops the test if we do not get the same sequence
as we expect.

The Open Group does not define which deterministic sequence srandom(1)
should result in, on that it be deterministic, but I have high hopes
in the general sanity and expect that UNIX people across the board
have realized that for portability the same sequence should be
returned on all platforms.

At the very least FreeBSD and Linux/GLIBC, as seen on projects.linpro.no,
agree.

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

16 years agoAdd a debug CLI command to seed random(3).
phk [Mon, 10 Nov 2008 09:29:52 +0000 (09:29 +0000)]
Add a debug CLI command to seed random(3).

This is a lot less useful than it could have been, as the Open Group
only mandates that:

Like rand(), random() shall produce by default a sequence
of numbers that can be duplicated by calling srandom() with
1 as the seed.

But crucially leaves out *which* sequence of numbers.

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

16 years agoA couple of stylistisc FlexeLint v9 nits, and some additions to the .lnt
phk [Sun, 9 Nov 2008 14:26:24 +0000 (14:26 +0000)]
A couple of stylistisc FlexeLint v9 nits, and some additions to the .lnt
file.

Unfortunately the thread support in FlexeLint is not quite up to our
standards of creative locking.

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

16 years agoMore FlexeLint v9 consts
phk [Sun, 9 Nov 2008 14:25:22 +0000 (14:25 +0000)]
More FlexeLint v9 consts

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

16 years agoConstifications requested by FlexeLint v9
phk [Sun, 9 Nov 2008 13:46:57 +0000 (13:46 +0000)]
Constifications requested by FlexeLint v9

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

16 years agoDocument the size parameter to -s malloc
tfheen [Thu, 6 Nov 2008 11:57:05 +0000 (11:57 +0000)]
Document the size parameter to -s malloc

Fixes #362

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

16 years agoFix up $N vs \N in man page
tfheen [Thu, 6 Nov 2008 11:46:31 +0000 (11:46 +0000)]
Fix up $N vs \N in man page

The VCL man page documented the capturing parentheses as using $N
rather than \N which is actually used.

Fixes #359

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

16 years agoFix up tclsh invocation (again)
tfheen [Thu, 6 Nov 2008 11:45:45 +0000 (11:45 +0000)]
Fix up tclsh invocation (again)

Move the || true bit of invoking tclsh to the Makefile, since
missing would otherwise not pass the file name to tclsh.

Thanks to des for spotting this.

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

16 years agoFix the broken logic in the random directors picking routine.
phk [Wed, 5 Nov 2008 12:51:51 +0000 (12:51 +0000)]
Fix the broken logic in the random directors picking routine.

Drop the consistency check for health-changes, at the cost of a
slight bias[1] for hosts before, or after, then one that changed health,
according to how its health changed.

Count all failures to pick against the retry count.

Fixes #361

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

16 years ago* Sun Nov 02 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0.1-2
ingvar [Sun, 2 Nov 2008 21:39:28 +0000 (21:39 +0000)]
* Sun Nov 02 2008 Ingvar Hagelund <ingvar@linpro.no> - 2.0.1-2
- Removed the requirement for kernel => 2.6.0. All supported
  platforms meets this, and it generates strange errors in EPEL

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

16 years agovarnishtest man page: whitespace fix
ssm [Thu, 30 Oct 2008 07:00:00 +0000 (07:00 +0000)]
varnishtest man page: whitespace fix

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

16 years agoAdd a varnishtest man page
ssm [Wed, 29 Oct 2008 06:55:40 +0000 (06:55 +0000)]
Add a varnishtest man page

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

16 years agoFactor the HTTP responsecodes into a file where we can
phk [Tue, 28 Oct 2008 13:22:29 +0000 (13:22 +0000)]
Factor the HTTP responsecodes into a file where we can
find them.

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

16 years agothanks mithrandir -- check the right magic
sky [Tue, 28 Oct 2008 12:33:19 +0000 (12:33 +0000)]
thanks mithrandir -- check the right magic

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

16 years agoresp.status was returning obj.status
sky [Tue, 28 Oct 2008 12:21:15 +0000 (12:21 +0000)]
resp.status was returning obj.status

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

16 years agomerge #3350 into trunk -- make tests fail if you have a long and correct search list...
sky [Mon, 27 Oct 2008 00:36:04 +0000 (00:36 +0000)]
merge #3350 into trunk -- make tests fail if you have a long and correct search list; which my laptop has

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

16 years agoDon't quote the entire inlined C source in the index table, just show C{
phk [Thu, 23 Oct 2008 07:49:19 +0000 (07:49 +0000)]
Don't quote the entire inlined C source in the index table, just show C{

Spotted by: nkallen

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

16 years agoGet rid of <strings.h>.
des [Wed, 22 Oct 2008 11:33:58 +0000 (11:33 +0000)]
Get rid of <strings.h>.

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