#include <XrdBuffer.hh>
Public Member Functions | |
| void | Init () |
| XrdBuffer * | Obtain (int bsz) |
| int | Recalc (int bsz) |
| void | Release (XrdBuffer *bp) |
| int | MaxSize () |
| void | Reshape () |
| void | Set (int maxmem=-1, int minw=-1) |
| int | Stats (char *buff, int blen, int do_sync=0) |
| XrdBuffManager (int minrst=20 *60) | |
| ~XrdBuffManager () | |
Private Attributes | |
| const int | slots |
| const int | shift |
| const int | pagsz |
| const int | maxsz |
| struct { | |
| XrdBuffer * bnext | |
| int numbuf | |
| int numreq | |
| } | bucket [XRD_BUCKETS] |
| int | totreq |
| int | totbuf |
| long long | totalo |
| long long | maxalo |
| int | minrsw |
| int | rsinprog |
| int | totadj |
| XrdSysCondVar | Reshaper |
Static Private Attributes | |
| static const char * | TraceID |
Definition at line 54 of file XrdBuffer.hh.
| XrdBuffManager::XrdBuffManager | ( | int | minrst = 20 *60 |
) |
| XrdBuffManager::~XrdBuffManager | ( | ) | [inline] |
Definition at line 76 of file XrdBuffer.hh.
| void XrdBuffManager::Init | ( | ) |
Definition at line 86 of file XrdBuffer.cc.
References XrdSysError::Emsg(), XrdSysThread::Run(), and XrdReshaper().
Referenced by XrdConfig::Setup().
| XrdBuffer * XrdBuffManager::Obtain | ( | int | bsz | ) |
Definition at line 102 of file XrdBuffer.cc.
References bnext, bucket, free(), XrdSysCondVar::Lock(), maxalo, maxsz, memalign, XrdBuffer::next, pagsz, Reshaper, rsinprog, shift, XrdSysCondVar::Signal(), slots, totalo, totbuf, totreq, and XrdSysCondVar::UnLock().
Referenced by XrdXrootdAio::Alloc(), XrdXrootdProtocol::getBuff(), XrdProofdProtocol::GetBuff(), and XrdXrootdProtocol::Process().
| int XrdBuffManager::Recalc | ( | int | bsz | ) |
Definition at line 156 of file XrdBuffer.cc.
References maxsz, shift, and slots.
Referenced by XrdXrootdProtocol::xasync().
| void XrdBuffManager::Release | ( | XrdBuffer * | bp | ) |
Definition at line 181 of file XrdBuffer.cc.
References XrdBuffer::bindex, bucket, XrdSysCondVar::Lock(), XrdBuffer::next, Reshaper, and XrdSysCondVar::UnLock().
Referenced by XrdXrootdProtocol::Cleanup(), XrdXrootdProtocol::getBuff(), XrdProofdProtocol::GetBuff(), XrdXrootdProtocol::Process(), XrdXrootdAio::Recycle(), XrdProofdProtocol::Recycle(), XrdProofdProtocol::ReleaseBuff(), and XrdProofdProtocol::SendData().
| int XrdBuffManager::MaxSize | ( | ) | [inline] |
Definition at line 66 of file XrdBuffer.hh.
References maxsz.
Referenced by XrdProofdProtocol::Configure(), and XrdXrootdProtocol::Configure().
| void XrdBuffManager::Reshape | ( | ) |
Definition at line 198 of file XrdBuffer.cc.
References bnext, bucket, i, XrdSysCondVar::Lock(), long, maxalo, maxsz, MEM, minrsw, XrdBuffer::next, numbuf, numreq, Reshaper, rsinprog, slots, RooFit::Timer(), totadj, totalo, totbuf, totreq, TRACE, XrdSysCondVar::UnLock(), XrdSysCondVar::Wait(), and XRD_BUCKETS.
Referenced by XrdReshaper().
| void XrdBuffManager::Set | ( | int | maxmem = -1, |
|
| int | minw = -1 | |||
| ) |
Definition at line 261 of file XrdBuffer.cc.
References XrdSysCondVar::Lock(), long, maxalo, minrsw, Reshaper, and XrdSysCondVar::UnLock().
Referenced by XrdConfig::xbuf().
| int XrdBuffManager::Stats | ( | char * | buff, | |
| int | blen, | |||
| int | do_sync = 0 | |||
| ) |
Definition at line 276 of file XrdBuffer.cc.
References XrdSysCondVar::Lock(), Reshaper, snprintf, totadj, totalo, totbuf, totreq, and XrdSysCondVar::UnLock().
Referenced by XrdStats::Stats().
const int XrdBuffManager::slots [private] |
const int XrdBuffManager::shift [private] |
const int XrdBuffManager::pagsz [private] |
const int XrdBuffManager::maxsz [private] |
XrdBuffer* XrdBuffManager::bnext [private] |
int XrdBuffManager::numbuf [private] |
int XrdBuffManager::numreq [private] |
struct { ... } XrdBuffManager::bucket[XRD_BUCKETS] [private] |
Referenced by Obtain(), Release(), Reshape(), and XrdBuffManager().
int XrdBuffManager::totreq [private] |
Definition at line 90 of file XrdBuffer.hh.
Referenced by Obtain(), Reshape(), Stats(), and XrdBuffManager().
int XrdBuffManager::totbuf [private] |
Definition at line 91 of file XrdBuffer.hh.
Referenced by Obtain(), Reshape(), Stats(), and XrdBuffManager().
long long XrdBuffManager::totalo [private] |
Definition at line 92 of file XrdBuffer.hh.
Referenced by Obtain(), Reshape(), Stats(), and XrdBuffManager().
long long XrdBuffManager::maxalo [private] |
Definition at line 93 of file XrdBuffer.hh.
Referenced by Obtain(), Reshape(), Set(), and XrdBuffManager().
int XrdBuffManager::minrsw [private] |
int XrdBuffManager::rsinprog [private] |
Definition at line 95 of file XrdBuffer.hh.
Referenced by Obtain(), Reshape(), and XrdBuffManager().
int XrdBuffManager::totadj [private] |
XrdSysCondVar XrdBuffManager::Reshaper [private] |
const char * XrdBuffManager::TraceID [static, private] |
Definition at line 99 of file XrdBuffer.hh.
1.5.1