On Wed, Jun 11, 2008, Henrik Nordstrom wrote: > > All the callback does is read into a temp buffer, and re-schedules for > > read IO. > > Yes.. > > The point of this wakeup is to break the select/poll/epoll/kqueue sleep.
I found that in the CVS history. > It could obviously be optimized to only call this callback if there was > a wakeup event on the pipe (or whatever the store_dir is using). It's > done this way because the pipe was added after the storeDirCallback() > API framework was in place. > > diskd should also have a similar event descriptor, not sure it has > today. How would it work? The diskd queues are all sysv msgq's which can't be polled as filedescriptors. What would wake up the main Squid process? (I'm a big fan of removing diskd entirely btw, once the performance issues that people complain about with aufs vs diskd are resolved.) > Proposal: Drop storeDirCallback() (and it's corresponding > SwapDir->callback), and let each store_dir (or driver if not having per > cache_dir queues) register it's own wakeup event to process the > callbacks. We can't for diskd. Suggestions welcome. > > 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. > > If you clean it up to get rid of storeDirCallback() entirely then it's a > +1 from me. Ok. > The next step is to clean up aiops to have a set of worker threads per > store instead of the global pool it has today. Would open up for proper > load scheduling and also make it possibe to add fault management if a > disk fails.. Thats another problem entirely; one which I'll probably attack in cacheboy after I sort through disassocating all the comm and aiops code from the main source tree. Adrian -- - Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support - - $25/pm entry-level VPSes w/ capped bandwidth charges available in WA -
