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.