adrian [Thu, 17 Aug 2000 15:15:06 +0000 (15:15 +0000)]
Tidying up some memory allocation code, so MemPool code is always
freed correctly, and making sure that the mempools that DO exist for
some structures are actually used.
adrian [Tue, 15 Aug 2000 13:14:03 +0000 (13:14 +0000)]
Allow the hot object -> transit object transition point to be configurable,
rather than hard-coded at SM_PAGE_SIZE. This change should allow a higher
memory hitrate, and makes the current object memory code kind of behave like
the old 'all or nothing' hot object memory cache.
This change should now be placed in the handbook/FAQ somewhere.
hno [Mon, 14 Aug 2000 03:18:09 +0000 (03:18 +0000)]
The snmp_community ACL check segfaulted if Squid failed to parse
the SNMP query. We might want to backport this to 2.3, and release
it as a patch as this can be used to DOS anyone with SNMP enabled
and using the snmp_community ACL.
A workaround is to base access controls purely on the source address
instead of using a community.
wessels [Wed, 2 Aug 2000 04:01:29 +0000 (04:01 +0000)]
DW:
- Francis A. Vidal reported this assertion with load factors 0.6 and
0.4. Alex instructed me that all floating point math is unpredictable
and we should not use floating point equality comparisons.
DW:
- Once again wasted time tracking down a hit ratio problem, eventually
re-learning that storeDirSelectSwapDirLeastLoad() could return -1
causing a swapout to fail. This patch logs those cases to store.log.
DW:
- A fix for 'range_offset_limit'. Moved the range_offset_limit
check earlier in the client-side processing -- before the request
is determined to be a hit or miss, and before its forwarded.
- Extended the logic for determning when a range request should be
an uncachable miss due to range_offset_limit. If the request
would be a HIT on a PENDING object, we force a MISS if we can't
give the client the offset that it wants right away.
- Found it necessary to add request->flags.we_dont_do_ranges. The
flag is set by the client side, and read in the server side to
figure out if the Range header should be sent or not.
referer_log requires USE_REFERER_LOG, or the build fails..
also updated the tag comments to the new format where --enable..
and defaults are automatically generated.
DW:
- Brad <brad@comstyle.com> pointed out that some configure --enable
descriptions don't match the arg names. They were using "_" instead
of "-". This patch makes all descriptions use "-", or at least
match the argument.
DW:
- In storeDiskdSend() we used to loop on storeDiskdDirCallback(sd)
if we were over the magic2 limit. There were two problems with
that approach. The loop was at CPU speed; there were no delays.
When this condition occurs, Squid could hog the CPU when it would
be better to give some cycles to the diskd processes. Also, we
need to check callbacks for *all* swap directories, not just the
current one.
This patch calls storeDirCallback() instead. It also adds an
exponentially increasing delay between calls, with a 500ms limit.
select is used as a somewhat portable microsecond sleep timer.
hno [Tue, 27 Jun 2000 14:41:30 +0000 (14:41 +0000)]
Complete rewrite of the removal policy list, to work along the
same lines as the filesystem list. Now a list of calls to
storeReplAdd() is generated, which adds the policies to a dynamic
list, and storeCreateRemovalPolicy searches this list for the
requested policy name.
This also allows for a seemless integration of loadable modules
at any time. All that is needed to have filesystems or policies
in loadable modules is to write the few lines of code required
to bring in the shared object, and to call the appropriate
registering function (storeFsAdd or storeReplAdd).
adrian [Tue, 27 Jun 2000 02:17:12 +0000 (02:17 +0000)]
The last two changes from modio:
* bring ufs to the latest incarnation of ufs-style object/file/bitmap
removal.
* Make the use of truncate() in diskd.c dependant upon #if USE_TRUNCATE,
like it should be.
wessels [Mon, 26 Jun 2000 10:57:16 +0000 (10:57 +0000)]
DW:
- Made the store dir selection algorithm configurable via
'store_dir_select_algorithm'. There are currently two options:
'least-load' (storeDirSelectSwapDirLeastLoad(), the default),
and 'round-robin' (storeDirSelectSwapDirRoundRobin()).
- Added counter stats to the storeCreate() function to find out
how often it fails and succeeds.
wessels [Mon, 26 Jun 2000 04:41:21 +0000 (04:41 +0000)]
DW:
- Support for extension methods via squid.conf. The admin
can define up to 20 additional methods with the
'extension_methods' wordlist. Methods are converted to
uppercase, and put into the RequestMethodStr[] array,
replacing some placeholders.
wessels [Wed, 21 Jun 2000 13:32:13 +0000 (13:32 +0000)]
DW:
- Added a special checks for large files. I've been seeing a
system crash followed by a reboot that seems to corrupt the swap
log. Squid believes that the disk holds some really large files.
It complains about using being over the high water mark and
proceeds to delete files as fast as it can. To prevent that,
we call stat() on sufficiently large files (>128KB) and reject
those that are missing or have the wrong size.
hno [Sat, 10 Jun 2000 01:59:52 +0000 (01:59 +0000)]
Minor bugfix to the textual output of configure for the removal policies
(said store modules not removal policies. Typical case of copy'n paste
decease)
hno [Wed, 7 Jun 2000 01:34:30 +0000 (01:34 +0000)]
Minor corrections of the formatting of the boilerplate section:
* One and only one blank line first in the files
* added the copyright bolierplate where it was missing
* a few missing debug section "none" statements
* author was missing on some files..
hno [Wed, 31 May 2000 14:57:07 +0000 (14:57 +0000)]
Corrected --disable-unlinkd. It didn't correctly parse the arguments
and always enabled unlinkd..
Excended the makefile trickery used for --disable-unlinkd to also
apply to dnsserver and pinger. Now no helpers are built or installed
unless requested.
Note: The makefile trickery will probably fail on old UNIX:es if no
helpers are to be installed. Need to find a way to test if a variable
contains anything else besides whitespace.. Workaround: Don't use
--disable-unlinkd or use --disable-internal-dns.
The error message Squid sent when the client did not send a initial
request in a timely manner confused browsers using persistent connections.
It is better to simply close the connection, forcing the user agent to retry
any pending request.
Fixes some bogous bogous MD5 key mismatch warnings when using
the aufs or diskd stores. This is due to their asyncronous nature where
objects might get removed from the cache while they are being read from
disk.
Also rearranged the ChangeLog somewhat since Duane apparently have made
an internal Squid-2.4.DEVEL3 release..
hno [Tue, 30 May 2000 05:36:23 +0000 (05:36 +0000)]
Workaround/fix for a race condition between storeSwapOut and
stmemFreeDataUpto. The freeing of memory data could cause
entry->mem->swapout.memnode to reference a freed memory chunk..
wessels [Mon, 29 May 2000 09:10:39 +0000 (09:10 +0000)]
DW:
- Running the current code on an older 2.4 cache results in unlink
errors. During 2.4 development, we changed the way swap file
numbers are assigned and stored. The high 16 bits used to encode
the SD index number. There used to be a call to storeDirProperFileno
here that re-assigned the index bits. Now, for backwards
compatibility, we just need to mask it off.
wessels [Mon, 29 May 2000 07:53:58 +0000 (07:53 +0000)]
DW:
- The 'flag' parameter of storeDirValidFileno got deleted when it
became storeDirFSValidFileno (at least for diskd and ufs).
This flag is important for rebuilding. When the flag is set, it
enables the out-of-range check against the filemap size. Without
this check, the filemap does not grow during the rebuild procedure.
Instead, all objects with file numbers larger than the default (16k?)
get declared invalid and most of the cached objects are lost.
wessels [Mon, 29 May 2000 06:52:31 +0000 (06:52 +0000)]
DW:
- I'm getting a cbdata assertion when trying to 'cbdataFree' a
store_client. Its probably from this call to storeUnregister
with http->sc instead of http->old_sc. Regardless, its a good
idea to always NULL http->sc after calling unregister.