On mån, 2007-10-08 at 13:00 +0400, [EMAIL PROTECTED] wrote:
> Hi!
> 
> Here are three changes for squid2 HEAD cvs.
> 
> 1. initialize mem_obj (uninitialized can cause seg. fault).

Thanks!

Fixed this slightly differently however as entry might be NULL in some
corner cases..

> 2. use THREAD_FACTOR instead of hard coded constant 16.

Applied to both aiops.c and aiops_win32.c

> 3. call squidaio_sync in aufs dir maintenance to limit queue growth
>    (e.g. when repository size or high/low are decreased).

Not sure about this one.. this will make Squid block under load and
additionally screws up fs load metrics. Better to move unlinking to a
separate thread I think, similar to unlinkd, or to make store
maintenance back off when the load is too high..

Can you please test if the attached patch solves the problem for you? It
makes the maintenance back off if load gets too high.

Regards
Henrik
Index: src/fs/aufs/store_dir_aufs.c
===================================================================
RCS file: /cvsroot/squid/squid/src/fs/aufs/store_dir_aufs.c,v
retrieving revision 1.69
diff -u -p -r1.69 store_dir_aufs.c
--- src/fs/aufs/store_dir_aufs.c	1 Mar 2007 07:21:37 -0000	1.69
+++ src/fs/aufs/store_dir_aufs.c	8 Oct 2007 16:00:20 -0000
@@ -1551,6 +1551,8 @@ storeAufsDirMaintain(SwapDir * SD)
 	    break;		/* no more objects */
 	removed++;
 	storeRelease(e);
+	if (aioQueueSize() > MAGIC2)
+	    break;
     }
     walker->Done(walker);
     debug(47, (removed ? 2 : 3)) ("storeAufsDirMaintain: %s removed %d/%d f=%.03f max_scan=%d\n",

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to