DiskThreads.h File Reference
#include "dlink.h"
#include "mem/forward.h"
#include "DiskIO/DiskFile.h"
Include dependency graph for DiskThreads.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  squidaio_result_t
class  squidaio_ctrl_t
class  AIOCounts


#define NUMTHREADS   (Config.cacheSwap.n_configured*16)
#define MAGIC1   (NUMTHREADS*Config.cacheSwap.n_configured*5)
#define MAGIC2   (NUMTHREADS*Config.cacheSwap.n_configured*20)
#define ASYNC_OPEN   1
#define ASYNC_CLOSE   0
#define ASYNC_CREATE   1
#define ASYNC_WRITE   0
#define ASYNC_READ   1


typedef enum _squidaio_request_type squidaio_request_type
typedef void AIOCB (int fd, void *cbdata, const char *buf, int aio_return, int aio_errno)


enum  _squidaio_request_type {
  _AIO_OP_NONE = 0,


void squidaio_init (void)
void squidaio_shutdown (void)
int squidaio_cancel (squidaio_result_t *)
int squidaio_open (const char *, int, mode_t, squidaio_result_t *)
int squidaio_read (int, char *, size_t, off_t, int, squidaio_result_t *)
int squidaio_write (int, char *, size_t, off_t, int, squidaio_result_t *)
int squidaio_close (int, squidaio_result_t *)
int squidaio_stat (const char *, struct stat *, squidaio_result_t *)
int squidaio_unlink (const char *, squidaio_result_t *)
int squidaio_opendir (const char *, squidaio_result_t *)
squidaio_result_tsquidaio_poll_done (void)
int squidaio_operations_pending (void)
int squidaio_sync (void)
int squidaio_get_queue_len (void)
void * squidaio_xmalloc (int size)
void squidaio_xfree (void *p, int size)
void squidaio_stats (StoreEntry *)
void aioInit (void)
void aioDone (void)
void aioCancel (int)
void aioOpen (const char *, int, mode_t, AIOCB *, void *)
void aioClose (int)
void aioWrite (int, off_t offset, char *, size_t size, AIOCB *, void *, FREE *)
void aioRead (int, off_t offset, size_t size, AIOCB *, void *)
void aioStat (char *, struct stat *, AIOCB *, void *)
void aioUnlink (const char *, AIOCB *, void *)
int aioQueueSize (void)


AIOCounts squidaio_counts
dlink_list used_list

Macro Definition Documentation

#define ASYNC_CLOSE   0

Definition at line 40 of file DiskThreads.h.

#define ASYNC_CREATE   1

Definition at line 41 of file DiskThreads.h.

#define ASYNC_OPEN   1

Definition at line 39 of file DiskThreads.h.

#define ASYNC_READ   1

Definition at line 43 of file DiskThreads.h.

#define ASYNC_WRITE   0

Definition at line 42 of file DiskThreads.h.

#define MAGIC1   (NUMTHREADS*Config.cacheSwap.n_configured*5)

Definition at line 34 of file DiskThreads.h.

Referenced by DiskThreadsIOStrategy::load(), and squidaio_queue_request().

#define MAGIC2   (NUMTHREADS*Config.cacheSwap.n_configured*20)

Definition at line 36 of file DiskThreads.h.

Referenced by DiskThreadsIOStrategy::shedLoad().

#define NUMTHREADS   (Config.cacheSwap.n_configured*16)

Definition at line 30 of file DiskThreads.h.

Referenced by squidaio_init(), squidaio_shutdown(), and squidaio_stats().

Typedef Documentation

typedef void AIOCB(int fd, void *cbdata, const char *buf, int aio_return, int aio_errno)

Definition at line 57 of file DiskThreads.h.

Definition at line 55 of file DiskThreads.h.

Enumeration Type Documentation


Definition at line 45 of file DiskThreads.h.

Function Documentation

void aioDone ( void  )
void aioInit ( void  )
int aioQueueSize ( void  )

Definition at line 199 of file async_io.cc.

Referenced by DiskThreadsIOStrategy::load(), and DiskThreadsIOStrategy::shedLoad().

int squidaio_get_queue_len ( void  )

Definition at line 967 of file aiops.cc.

References request_queue_len.

Referenced by DiskThreadsIOStrategy::aioStats().

int squidaio_opendir ( const char *  ,
int squidaio_operations_pending ( void  )

Definition at line 949 of file aiops.cc.

References done_requests, and request_queue_len.

Referenced by squidaio_sync().

int squidaio_sync ( void  )
void squidaio_xfree ( void *  p,
int  size 
void* squidaio_xmalloc ( int  size)

Definition at line 171 of file aiops.cc.

References MemAllocator::alloc(), NULL, p, squidaio_get_pool(), and xmalloc.

Referenced by aioRead(), squidaio_stat(), and squidaio_xstrdup().

Variable Documentation

AIOCounts squidaio_counts

Definition at line 18 of file async_io.cc.

Referenced by DiskThreadsIOStrategy::aioStats(), and DiskThreadsIOStrategy::callback().

dlink_list used_list

Definition at line 26 of file async_io.cc.

Referenced by DiskThreadsIOStrategy::callback().






Web Site Translations