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.


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

Definition at line 36 of file DiskThreads.h.


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

Definition at line 30 of file DiskThreads.h.

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.

◆ squidaio_request_type

Definition at line 1 of file DiskThreads.h.

Enumeration Type Documentation

◆ _squidaio_request_type


Definition at line 45 of file DiskThreads.h.

Function Documentation

◆ aioCancel()

◆ aioClose()

◆ aioDone()

void aioDone ( void  )

◆ aioInit()

void aioInit ( void  )

◆ aioOpen()

◆ aioQueueSize()

int aioQueueSize ( void  )

Definition at line 199 of file async_io.cc.

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

◆ aioRead()

◆ aioStat()

◆ aioUnlink()

◆ aioWrite()

◆ squidaio_cancel()

int squidaio_cancel ( squidaio_result_t )

Definition at line 624 of file aiops.cc.

References _AIO_OP_NONE, squidaio_result_t::_data, debugs, NULL, request(), and squidaio_result_t::result_type.

Referenced by aioCancel().

◆ squidaio_close()

◆ squidaio_get_queue_len()

int squidaio_get_queue_len ( void  )

Definition at line 966 of file aiops.cc.

References request_queue_len.

Referenced by DiskThreadsIOStrategy::aioStats().

◆ squidaio_init()

◆ squidaio_open()

◆ squidaio_opendir()

int squidaio_opendir ( const char *  ,

◆ squidaio_operations_pending()

int squidaio_operations_pending ( void  )

Definition at line 948 of file aiops.cc.

References done_requests, and request_queue_len.

Referenced by squidaio_sync().

◆ squidaio_poll_done()

◆ squidaio_read()

◆ squidaio_shutdown()

◆ squidaio_stat()

◆ squidaio_stats()

◆ squidaio_sync()

int squidaio_sync ( void  )

◆ squidaio_unlink()

◆ squidaio_write()

◆ squidaio_xfree()

void squidaio_xfree ( void *  p,
int  size 

◆ squidaio_xmalloc()

void* squidaio_xmalloc ( int  size)

Definition at line 170 of file aiops.cc.

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

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

Variable Documentation

◆ squidaio_counts

◆ used_list






Web Site Translations