From: Alex Rousskov Date: Wed, 1 Jan 2014 20:13:23 +0000 (-0700) Subject: Initial Large Rock and Collapsed Forwarding support. X-Git-Tag: SQUID_3_5_0_1~444 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa2301d;p=thirdparty%2Fsquid.git Initial Large Rock and Collapsed Forwarding support. Large Rock: Support disk (and shared memory) caching of responses exceeding one db slot (or one shared memory page) in size. A single db slot/page size is still limited to 32KB (smaller values can be configured for disk caches using the newly added cache_dir slot-size option). Removal of old rock cache dir (followed by squid-z) is required -- the on-disk db structure has changed. Collapsed Forwarding: Optionally merge concurrent cachable requests for the same URI earlier: After the request headers have been parsed (as before), but now _before_ the response headers have been received. Merging of requests received by different SMP workers is supported. Controlled by the new collapsed_forwarding directive in squid.conf. Disabled by default because all but one of the merged requests have to be delayed (until the response headers are received) for the merging to work, which may be worse than forwarding all concurrent requests immediately. The overall feature idea and request eligibility conditions are based on Collapsed Forwarding in Squid2. Summary of other important changes (merged branch log contains the details): * Tightened StoreEntry locking. Split StoreEntry::lock() into "just lock" and "update entry reference time" interfaces, addressing an old XXX. Improved entry lock/unlock debugging. Needs more work. * Adjusted StoreIOState::write() API to allow callers detect write errors. * Simplified MemObject::write() API to remove an essentially unused callback. * Mark client streams that sent everything as STREAM_COMPLETE. The old code used STREAM_UNPLANNED_COMPLETE if the completed stream was associated with a non-persistent connection, which did not make sense to me and, IIRC, led to store entry aborts even though the entries were not damaged in any way. * mem_hdr::hasContigousContentRange() now returns true for empty ranges. * Support "appending" ReadWriteLock state that can be shared by readers and the writer. The writer promises not to update key metadata (except growing object size and next pointers) and readers promise to be careful when reading growing slices. * Fixed StoreEntry::mayStartSwapOut() logic to handle terminated swapouts. * Improved STORE_MEM_CLIENT detection and documented known (and mostly old) StoreEntry::storeClientType() problems. * Removed StoreEntry::hidden_mem_obj hack. * Polished StoreEntry debugging to report more info, less noise. Use e: prefix. * Added a script to extract store entry(ies) debugging from cache.log. --- fa2301d26b90cbd1298eb7740e8827c7746cd9d2