#include <DiskdIOStrategy.h>

Inheritance diagram for DiskdIOStrategy:
Collaboration diagram for DiskdIOStrategy:

Public Member Functions

 DiskdIOStrategy ()
 
virtual bool shedLoad ()
 
virtual int load ()
 
virtual RefCount< DiskFilenewFile (char const *path)
 
virtual bool unlinkdUseful () const
 
virtual void unlinkFile (char const *)
 
virtual ConfigOptiongetOptionTree () const
 
virtual void init ()
 
virtual void sync ()
 
virtual int callback ()
 
virtual void statfs (StoreEntry &sentry) const
 
int send (int mtype, int id, DiskdFile *theFile, size_t size, off_t offset, ssize_t shm_offset, Lock *requestor)
 

Public Attributes

SharedMemory shm
 

Private Member Functions

void openFailed ()
 
bool optionQ1Parse (char const *option, const char *value, int reconfiguring)
 
void optionQ1Dump (StoreEntry *e) const
 
bool optionQ2Parse (char const *option, const char *value, int reconfiguring)
 
void optionQ2Dump (StoreEntry *e) const
 
int send (int mtype, int id, RefCount< StoreIOState > sio, size_t size, off_t offset, ssize_t shm_offset)
 
int SEND (diomsg *M, int mtype, int id, size_t size, off_t offset, ssize_t shm_offset)
 
void handle (diomsg *M)
 
void unlinkDone (diomsg *M)
 

Static Private Member Functions

static size_t newInstance ()
 

Private Attributes

int magic1
 
int magic2
 
int away
 
int smsgid
 
int rmsgid
 
int wfd
 
size_t instanceID
 

Static Private Attributes

static size_t nextInstanceID
 

Detailed Description

Definition at line 42 of file DiskdIOStrategy.h.

Constructor & Destructor Documentation

DiskdIOStrategy::DiskdIOStrategy ( )

Definition at line 89 of file DiskdIOStrategy.cc.

Member Function Documentation

int DiskdIOStrategy::callback ( )
virtual
ConfigOption * DiskdIOStrategy::getOptionTree ( ) const
virtual

module specific options

Reimplemented from DiskIOStrategy.

Definition at line 423 of file DiskdIOStrategy.cc.

References optionQ1Dump(), optionQ1Parse(), optionQ2Dump(), optionQ2Parse(), and ConfigOptionVector::options.

int DiskdIOStrategy::load ( )
virtual

What is the current load? 999 = 99.9%

Implements DiskIOStrategy.

Definition at line 65 of file DiskdIOStrategy.cc.

References away, and magic2.

DiskFile::Pointer DiskdIOStrategy::newFile ( char const *  path)
virtual

Return a handle for performing IO operations

Implements DiskIOStrategy.

Definition at line 79 of file DiskdIOStrategy.cc.

References NULL, openFailed(), and shedLoad().

size_t DiskdIOStrategy::newInstance ( )
staticprivate

Definition at line 43 of file DiskdIOStrategy.cc.

References nextInstanceID.

void DiskdIOStrategy::openFailed ( )
private

Definition at line 73 of file DiskdIOStrategy.cc.

References diskd_stats_t::open_fail_queue_len.

Referenced by newFile().

void DiskdIOStrategy::optionQ1Dump ( StoreEntry e) const
private

Definition at line 465 of file DiskdIOStrategy.cc.

References magic1, and storeAppendPrintf().

Referenced by getOptionTree().

bool DiskdIOStrategy::optionQ1Parse ( char const *  option,
const char *  value,
int  reconfiguring 
)
private

Definition at line 432 of file DiskdIOStrategy.cc.

References DBG_IMPORTANT, debugs, and magic1.

Referenced by getOptionTree().

void DiskdIOStrategy::optionQ2Dump ( StoreEntry e) const
private

Definition at line 497 of file DiskdIOStrategy.cc.

References magic2, and storeAppendPrintf().

Referenced by getOptionTree().

bool DiskdIOStrategy::optionQ2Parse ( char const *  option,
const char *  value,
int  reconfiguring 
)
private

Definition at line 471 of file DiskdIOStrategy.cc.

References DBG_IMPORTANT, debugs, and magic2.

Referenced by getOptionTree().

int DiskdIOStrategy::send ( int  mtype,
int  id,
DiskdFile theFile,
size_t  size,
off_t  offset,
ssize_t  shm_offset,
Lock requestor 
)
int DiskdIOStrategy::send ( int  mtype,
int  id,
RefCount< StoreIOState sio,
size_t  size,
off_t  offset,
ssize_t  shm_offset 
)
private
bool DiskdIOStrategy::shedLoad ( )
virtual

Can the IO Strategy handle more requests ?

Implements DiskIOStrategy.

Definition at line 49 of file DiskdIOStrategy.cc.

References away, debugs, and magic1.

Referenced by newFile(), and unlinkFile().

void DiskdIOStrategy::statfs ( StoreEntry ) const
virtual

cachemgr output on the IO instance stats

Reimplemented from DiskIOStrategy.

Definition at line 573 of file DiskdIOStrategy.cc.

References away, and storeAppendPrintf().

void DiskdIOStrategy::sync ( )
virtual

flush all IO operations

Reimplemented from DiskIOStrategy.

Definition at line 507 of file DiskdIOStrategy.cc.

References away, callback(), DBG_IMPORTANT, debugs, and squid_curtime.

bool DiskdIOStrategy::unlinkdUseful ( ) const
virtual

whether the IO Strategy can use unlinkd

Implements DiskIOStrategy.

Definition at line 93 of file DiskdIOStrategy.cc.

void DiskdIOStrategy::unlinkFile ( char const *  )
virtual

Member Data Documentation

int DiskdIOStrategy::away
private

Definition at line 89 of file DiskdIOStrategy.h.

Referenced by callback(), load(), SEND(), shedLoad(), statfs(), and sync().

size_t DiskdIOStrategy::instanceID
private

Definition at line 93 of file DiskdIOStrategy.h.

Referenced by init().

int DiskdIOStrategy::magic1
private

magic1 is the number of messages away which we stop allowing open/create for.

Definition at line 79 of file DiskdIOStrategy.h.

Referenced by optionQ1Dump(), optionQ1Parse(), and shedLoad().

int DiskdIOStrategy::magic2
private

magic2 is the point at which we start blocking on msgsnd/msgrcv. If a queue has magic2 (or more) messages away, then we read the queue until the level falls below magic2. Recommended value is 75% of SHMBUFS.

Definition at line 87 of file DiskdIOStrategy.h.

Referenced by callback(), init(), load(), optionQ2Dump(), optionQ2Parse(), and SEND().

size_t DiskdIOStrategy::nextInstanceID
staticprivate

Definition at line 64 of file DiskdIOStrategy.h.

Referenced by newInstance().

int DiskdIOStrategy::rmsgid
private

Definition at line 91 of file DiskdIOStrategy.h.

Referenced by callback(), and init().

SharedMemory DiskdIOStrategy::shm

public for accessing return address's

Definition at line 60 of file DiskdIOStrategy.h.

Referenced by callback(), DiskdFile::create(), init(), DiskdFile::open(), DiskdFile::read(), DiskdFile::readDone(), SEND(), unlinkDone(), unlinkFile(), and DiskdFile::write().

int DiskdIOStrategy::smsgid
private

Definition at line 90 of file DiskdIOStrategy.h.

Referenced by init(), and SEND().

int DiskdIOStrategy::wfd
private

Definition at line 92 of file DiskdIOStrategy.h.

Referenced by init().


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors