#include <DiskThreadsIOStrategy.h>
Public Member Functions | |
DiskThreadsIOStrategy () | |
bool | shedLoad () override |
int | load () override |
RefCount< DiskFile > | newFile (char const *path) override |
bool | unlinkdUseful () const override |
void | unlinkFile (char const *) override |
int | callback () override |
void | sync () override |
void | init () override |
void | done () |
virtual void | statfs (StoreEntry &) const |
virtual ConfigOption * | getOptionTree () const |
Public Attributes | |
bool | initialised |
Static Public Attributes | |
static DiskThreadsIOStrategy | Instance |
Private Member Functions | |
void | registerWithCacheManager (void) |
Static Private Member Functions | |
static void | aioStats (StoreEntry *sentry) |
Detailed Description
Definition at line 23 of file DiskThreadsIOStrategy.h.
Constructor & Destructor Documentation
◆ DiskThreadsIOStrategy()
DiskThreadsIOStrategy::DiskThreadsIOStrategy | ( | ) |
Definition at line 164 of file DiskThreadsIOStrategy.cc.
Member Function Documentation
◆ aioStats()
|
staticprivate |
Definition at line 169 of file DiskThreadsIOStrategy.cc.
References AIOCounts::cancel, AIOCounts::check_callback, AIOCounts::close_finish, AIOCounts::close_start, AIOCounts::open_finish, AIOCounts::open_start, PRIu64, AIOCounts::read_finish, AIOCounts::read_start, squidaio_counts, squidaio_get_queue_len(), squidaio_stats(), AIOCounts::stat_finish, AIOCounts::stat_start, storeAppendPrintf(), AIOCounts::unlink_finish, AIOCounts::unlink_start, AIOCounts::write_finish, and AIOCounts::write_start.
Referenced by registerWithCacheManager().
◆ callback()
|
overridevirtual |
perform any pending callbacks
Reimplemented from DiskIOStrategy.
Definition at line 61 of file DiskThreadsIOStrategy.cc.
References _AIO_OP_CLOSE, _AIO_OP_NONE, _AIO_OP_OPEN, _AIO_OP_OPENDIR, _AIO_OP_READ, _AIO_OP_STAT, _AIO_OP_UNLINK, _AIO_OP_WRITE, _AIO_OPEN, _AIO_READ, squidaio_result_t::aio_errno, squidaio_result_t::aio_return, aioClose(), assert, squidaio_ctrl_t::bufp, cbdataReferenceValidDone, AIOCounts::check_callback, AIOCounts::close_finish, squidaio_result_t::data, dlinkDelete(), squidaio_ctrl_t::done_handler, squidaio_ctrl_t::done_handler_data, squidaio_ctrl_t::fd, squidaio_ctrl_t::free_func, initialised, squidaio_ctrl_t::len, squidaio_ctrl_t::node, AIOCounts::open_finish, squidaio_ctrl_t::operation, AIOCounts::read_finish, squidaio_ctrl_t::result, squidaio_result_t::result_type, squidaio_counts, squidaio_poll_done(), squidaio_xfree(), AIOCounts::stat_finish, AIOCounts::unlink_finish, used_list, and AIOCounts::write_finish.
Referenced by sync().
◆ done()
void DiskThreadsIOStrategy::done | ( | void | ) |
Definition at line 50 of file DiskThreadsIOStrategy.cc.
References initialised, and squidaio_shutdown().
Referenced by DiskThreadsDiskIOModule::gracefulShutdown().
◆ getOptionTree()
|
inlinevirtualinherited |
module specific options
Reimplemented in DiskdIOStrategy, and SingletonIOStrategy.
Definition at line 53 of file DiskIOStrategy.h.
Referenced by SingletonIOStrategy::getOptionTree().
◆ init()
|
overridevirtual |
Init per-instance logic
Reimplemented from DiskIOStrategy.
Definition at line 26 of file DiskThreadsIOStrategy.cc.
References initialised, and registerWithCacheManager().
Referenced by DiskThreadsDiskIOModule::init().
◆ load()
|
overridevirtual |
What is the current load? 999 = 99.9%
Implements DiskIOStrategy.
Definition at line 204 of file DiskThreadsIOStrategy.cc.
References aioQueueSize(), debugs, and MAGIC1.
◆ newFile()
|
overridevirtual |
Return a handle for performing IO operations
Implements DiskIOStrategy.
Definition at line 222 of file DiskThreadsIOStrategy.cc.
References shedLoad().
◆ registerWithCacheManager()
|
private |
Definition at line 43 of file DiskThreadsIOStrategy.cc.
References aioStats(), and Mgr::RegisterAction().
Referenced by init().
◆ shedLoad()
|
overridevirtual |
Can the IO Strategy handle more requests ?
Implements DiskIOStrategy.
Definition at line 187 of file DiskThreadsIOStrategy.cc.
References aioQueueSize(), and MAGIC2.
Referenced by newFile().
◆ statfs()
|
inlinevirtualinherited |
cachemgr output on the IO instance stats
Reimplemented in DiskdIOStrategy, and SingletonIOStrategy.
Definition at line 50 of file DiskIOStrategy.h.
Referenced by SingletonIOStrategy::statfs().
◆ sync()
|
overridevirtual |
flush all IO operations
Reimplemented from DiskIOStrategy.
Definition at line 149 of file DiskThreadsIOStrategy.cc.
References callback(), debugs, initialised, and squidaio_sync().
◆ unlinkdUseful()
|
overridevirtual |
whether the IO Strategy can use unlinkd
Implements DiskIOStrategy.
Definition at line 232 of file DiskThreadsIOStrategy.cc.
◆ unlinkFile()
|
overridevirtual |
unlink a file by path
Implements DiskIOStrategy.
Definition at line 238 of file DiskThreadsIOStrategy.cc.
References aioUnlink(), StatCounters::disk, statCounter, StatCounters::syscalls, and StatCounters::unlinks.
Member Data Documentation
◆ initialised
bool DiskThreadsIOStrategy::initialised |
Definition at line 38 of file DiskThreadsIOStrategy.h.
Referenced by callback(), done(), init(), and sync().
◆ Instance
|
static |
Definition at line 39 of file DiskThreadsIOStrategy.h.
Referenced by aioCancel(), aioClose(), aioOpen(), aioRead(), aioStat(), aioUnlink(), aioWrite(), DiskThreadsDiskIOModule::createStrategy(), DiskThreadsDiskIOModule::gracefulShutdown(), and DiskThreadsDiskIOModule::init().
The documentation for this class was generated from the following files:
- src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h
- src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc