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