]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Henrik
authorwessels <>
Thu, 8 Apr 1999 13:16:40 +0000 (13:16 +0000)
committerwessels <>
Thu, 8 Apr 1999 13:16:40 +0000 (13:16 +0000)
This patch makes overloaded async-io a non-fatal error.

The patch does two things:
1. Stop caching objects if the async-io queue is way to large.
2. Sync async-io operations if async-io queue gets ridicolously large
(was a fatal error).

src/protos.h
src/store.cc

index 49b8f09aa1ec4c0eb28599ad434b64f542b24663..3ee9ae8534de74e5dac2b5caaef744968617d290 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.314 1999/01/29 23:39:21 wessels Exp $
+ * $Id: protos.h,v 1.315 1999/04/08 07:16:40 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -77,6 +77,8 @@ extern int aio_unlink(const char *, aio_result_t *);
 extern int aio_opendir(const char *, aio_result_t *);
 extern aio_result_t *aio_poll_done(void);
 extern int aio_operations_pending(void);
+extern int aio_overloaded(void);
+extern int aio_sync(void);
 
 extern void aioCancel(int, void *);
 extern void aioOpen(const char *, int, mode_t, AIOCB *, void *, void *);
index ea0f78fcb72e76c03bda14e46d5c4e4d72f6251d..48fbbed00b667b004b9b2c200d04afbcff84b984 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.488 1999/02/02 18:14:23 wessels Exp $
+ * $Id: store.cc,v 1.489 1999/04/08 07:16:41 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -518,6 +518,10 @@ storeCheckCachable(StoreEntry * e)
         * out the object yet.
         */
        return 1;
+#if USE_ASYNC_IO
+    } else if (aio_overloaded()) {
+       debug(20, 2) ("storeCheckCachable: NO: Async-IO overloaded\n");
+#endif
     } else if (storeTooManyDiskFilesOpen()) {
        debug(20, 2) ("storeCheckCachable: NO: too many disk files open\n");
        store_check_cachable_hist.no.too_many_open_files++;