XrdBuffManager Class Reference

#include <XrdBuffer.hh>

List of all members.

Public Member Functions

void Init ()
XrdBufferObtain (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


Detailed Description

Definition at line 54 of file XrdBuffer.hh.


Constructor & Destructor Documentation

XrdBuffManager::XrdBuffManager ( int  minrst = 20 *60  ) 

Definition at line 57 of file XrdBuffer.cc.

References bucket, maxalo, minrsw, pagsz, rsinprog, sysconf(), totadj, totalo, totbuf, and totreq.

XrdBuffManager::~XrdBuffManager (  )  [inline]

Definition at line 76 of file XrdBuffer.hh.


Member Function Documentation

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().


Member Data Documentation

const int XrdBuffManager::slots [private]

Definition at line 80 of file XrdBuffer.hh.

Referenced by Obtain(), Recalc(), and Reshape().

const int XrdBuffManager::shift [private]

Definition at line 81 of file XrdBuffer.hh.

Referenced by Obtain(), and Recalc().

const int XrdBuffManager::pagsz [private]

Definition at line 82 of file XrdBuffer.hh.

Referenced by Obtain(), and XrdBuffManager().

const int XrdBuffManager::maxsz [private]

Definition at line 83 of file XrdBuffer.hh.

Referenced by MaxSize(), Obtain(), Recalc(), and Reshape().

XrdBuffer* XrdBuffManager::bnext [private]

Definition at line 85 of file XrdBuffer.hh.

Referenced by Obtain(), and Reshape().

int XrdBuffManager::numbuf [private]

Definition at line 86 of file XrdBuffer.hh.

Referenced by Reshape().

int XrdBuffManager::numreq [private]

Definition at line 87 of file XrdBuffer.hh.

Referenced by Reshape().

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]

Definition at line 94 of file XrdBuffer.hh.

Referenced by Reshape(), Set(), and XrdBuffManager().

int XrdBuffManager::rsinprog [private]

Definition at line 95 of file XrdBuffer.hh.

Referenced by Obtain(), Reshape(), and XrdBuffManager().

int XrdBuffManager::totadj [private]

Definition at line 96 of file XrdBuffer.hh.

Referenced by Reshape(), Stats(), and XrdBuffManager().

XrdSysCondVar XrdBuffManager::Reshaper [private]

Definition at line 98 of file XrdBuffer.hh.

Referenced by Obtain(), Release(), Reshape(), Set(), and Stats().

const char * XrdBuffManager::TraceID [static, private]

Definition at line 99 of file XrdBuffer.hh.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:50:10 2011 for ROOT_528-00b_version by  doxygen 1.5.1