So perusing the aio code in preparation to disassocate it from the Squid fs code, I found that there's a pipe being used as a notification/wakeup mechanism.
Basically, thread completion writes a ! into the pipe; this wakes up the main squid loop and calls a PF callback. All the callback does is read into a temp buffer, and re-schedules for read IO. We then call aioCheckCallbacks() per storedir each time through the comm loop. This can be hundreds of times a second; add 10 + store_dir's to the mix and this ends up being thousands of times a second at minimum. I then wondered why we weren't calling aioCheckCallbacks() here. I modified the code to do so and am successfully running polygraph against it. http://www.creative.net.au/diffs/20080711-cacheboy-aufs-callback.diff It should apply against 2.6, 2.7 and 2.HEAD as well as Cacheboy-HEAD. aioCheckCallbacks() is now being called much, much less frequently than it was before; more in line with how many operation requests there are. Could some people please test this out and let me know if it works? Adrian -- - Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support - - $25/pm entry-level VPSes w/ capped bandwidth charges available in WA -
