From: wessels <> Date: Thu, 8 Apr 1999 13:16:40 +0000 (+0000) Subject: Henrik X-Git-Tag: SQUID_3_0_PRE1~2293 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a4b7ff348c73f4efe45217fd1cf2fd3353b73f79;p=thirdparty%2Fsquid.git Henrik 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). --- diff --git a/src/protos.h b/src/protos.h index 49b8f09aa1..3ee9ae8534 100644 --- a/src/protos.h +++ b/src/protos.h @@ -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 *); diff --git a/src/store.cc b/src/store.cc index ea0f78fcb7..48fbbed00b 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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++;