|
xrootd
|
#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 (XrdSysError *lP, XrdOucTrace *tP, int minrst=20 *60) | |
| ~XrdBuffManager () | |
Private Attributes | |
| XrdOucTrace * | XrdTrace |
| XrdSysError * | XrdLog |
| 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 = "BuffManager" |
| XrdBuffManager::XrdBuffManager | ( | XrdSysError * | lP, |
| XrdOucTrace * | tP, | ||
| int | minrst = 20*60 |
||
| ) |
| XrdBuffManager::~XrdBuffManager | ( | ) | [inline] |
| void XrdBuffManager::Init | ( | ) |
References XrdSysThread::Run(), XrdReshaper(), XrdLog, and XrdSysError::Emsg().
Referenced by XrdConfig::Setup().
| int XrdBuffManager::MaxSize | ( | ) | [inline] |
References maxsz.
Referenced by XrdXrootdProtocol::Configure().
| XrdBuffer * XrdBuffManager::Obtain | ( | int | bsz | ) |
References maxsz, shift, slots, Reshaper, XrdSysCondVar::Lock(), totreq, bucket, bnext, XrdBuffer::next, XrdSysCondVar::UnLock(), pagsz, memalign, totbuf, totalo, maxalo, rsinprog, and XrdSysCondVar::Signal().
Referenced by XrdXrootdAio::Alloc(), XrdXrootdProtocol::Process(), and XrdXrootdProtocol::getBuff().
| int XrdBuffManager::Recalc | ( | int | bsz | ) |
References maxsz, shift, and slots.
Referenced by XrdXrootdProtocol::xasync().
| void XrdBuffManager::Release | ( | XrdBuffer * | bp | ) |
References XrdBuffer::bindex, Reshaper, XrdSysCondVar::Lock(), XrdBuffer::next, bucket, and XrdSysCondVar::UnLock().
Referenced by XrdXrootdAio::Recycle(), XrdXrootdProtocol::Process(), XrdXrootdProtocol::Cleanup(), and XrdXrootdProtocol::getBuff().
| void XrdBuffManager::Reshape | ( | ) |
References XRD_BUCKETS, maxalo, Reshaper, XrdSysCondVar::Lock(), XrdSysCondVar::Wait(), minrsw, totalo, TRACE, XrdSysCondVar::UnLock(), XrdSysTimer::Wait(), totreq, slots, totbuf, bucket, maxsz, numbuf, bnext, XrdBuffer::next, totadj, and rsinprog.
Referenced by XrdReshaper().
| void XrdBuffManager::Set | ( | int | maxmem = -1, |
| int | minw = -1 |
||
| ) |
References Reshaper, XrdSysCondVar::Lock(), maxalo, minrsw, and XrdSysCondVar::UnLock().
Referenced by XrdConfig::xbuf().
| int XrdBuffManager::Stats | ( | char * | buff, |
| int | blen, | ||
| int | do_sync = 0 |
||
| ) |
References Reshaper, XrdSysCondVar::Lock(), snprintf, totreq, totalo, totbuf, totadj, and XrdSysCondVar::UnLock().
Referenced by XrdStats::Stats().
struct { ... } XrdBuffManager::bucket[XRD_BUCKETS] [private] |
Referenced by XrdBuffManager(), Obtain(), Release(), and Reshape().
long long XrdBuffManager::maxalo [private] |
Referenced by XrdBuffManager(), Obtain(), Reshape(), and Set().
const int XrdBuffManager::maxsz [private] |
int XrdBuffManager::minrsw [private] |
Referenced by XrdBuffManager(), Reshape(), and Set().
Referenced by Reshape().
const int XrdBuffManager::pagsz [private] |
Referenced by XrdBuffManager(), and Obtain().
XrdSysCondVar XrdBuffManager::Reshaper [private] |
int XrdBuffManager::rsinprog [private] |
Referenced by XrdBuffManager(), Obtain(), and Reshape().
const int XrdBuffManager::shift [private] |
const int XrdBuffManager::slots [private] |
int XrdBuffManager::totadj [private] |
Referenced by XrdBuffManager(), Reshape(), and Stats().
long long XrdBuffManager::totalo [private] |
Referenced by XrdBuffManager(), Obtain(), Reshape(), and Stats().
int XrdBuffManager::totbuf [private] |
Referenced by XrdBuffManager(), Obtain(), Reshape(), and Stats().
int XrdBuffManager::totreq [private] |
Referenced by XrdBuffManager(), Obtain(), Reshape(), and Stats().
const char * XrdBuffManager::TraceID = "BuffManager" [static, private] |
XrdSysError* XrdBuffManager::XrdLog [private] |
Referenced by Init().
XrdOucTrace* XrdBuffManager::XrdTrace [private] |
1.7.5