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.

Classes

class  squidaio_result_t
 
class  squidaio_ctrl_t
 
class  AIOCounts
 

Macros

#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
 

Typedefs

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

Enumerations

enum  _squidaio_request_type {
  _AIO_OP_NONE = 0 ,
  _AIO_OP_OPEN ,
  _AIO_OP_READ ,
  _AIO_OP_WRITE ,
  _AIO_OP_CLOSE ,
  _AIO_OP_UNLINK ,
  _AIO_OP_OPENDIR ,
  _AIO_OP_STAT
}
 

Functions

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)
 

Variables

AIOCounts squidaio_counts
 
dlink_list used_list
 

Macro Definition Documentation

◆ ASYNC_CLOSE

#define ASYNC_CLOSE   0

Definition at line 40 of file DiskThreads.h.

◆ ASYNC_CREATE

#define ASYNC_CREATE   1

Definition at line 41 of file DiskThreads.h.

◆ ASYNC_OPEN

#define ASYNC_OPEN   1

Definition at line 39 of file DiskThreads.h.

◆ ASYNC_READ

#define ASYNC_READ   1

Definition at line 43 of file DiskThreads.h.

◆ ASYNC_WRITE

#define ASYNC_WRITE   0

Definition at line 42 of file DiskThreads.h.

◆ MAGIC1

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

Definition at line 34 of file DiskThreads.h.

◆ MAGIC2

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

Definition at line 36 of file DiskThreads.h.

◆ NUMTHREADS

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

Definition at line 30 of file DiskThreads.h.

Typedef Documentation

◆ AIOCB

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 55 of file DiskThreads.h.

Enumeration Type Documentation

◆ _squidaio_request_type

Enumerator
_AIO_OP_NONE 
_AIO_OP_OPEN 
_AIO_OP_READ 
_AIO_OP_WRITE 
_AIO_OP_CLOSE 
_AIO_OP_UNLINK 
_AIO_OP_OPENDIR 
_AIO_OP_STAT 

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()

◆ squidaio_close()

◆ squidaio_get_queue_len()

int squidaio_get_queue_len ( void  )

Definition at line 963 of file aiops.cc.

References request_queue_len.

Referenced by DiskThreadsIOStrategy::aioStats().

◆ squidaio_init()

◆ squidaio_open()

◆ squidaio_opendir()

int squidaio_opendir ( const char *  ,
squidaio_result_t  
)

◆ squidaio_operations_pending()

int squidaio_operations_pending ( void  )

Definition at line 945 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 
)

Definition at line 196 of file aiops.cc.

References size, squidaio_get_pool(), and xfree.

Referenced by aioCancel(), DiskThreadsIOStrategy::callback(), and squidaio_cleanup_request().

◆ squidaio_xmalloc()

void * squidaio_xmalloc ( int  size)

Definition at line 171 of file aiops.cc.

References size, squidaio_get_pool(), and xmalloc.

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

Variable Documentation

◆ squidaio_counts

◆ used_list

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors