[root] / trunk / io / io / src / TFileCacheRead.cxx Repository:
ViewVC logotype

Log of /trunk/io/io/src/TFileCacheRead.cxx

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 48306 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 16 16:01:47 2013 UTC (2 years ago) by pcanal
File length: 25795 byte(s)
Diff to previous 45494
From Elvin:

There was a race condition between the destructor of the TTree object and the functionality to kill the asynchronous thread doing the prefetching. 
In more detail: In the the TTree::~TTree line 789 the TFileCacheRead object of the current file is set to 0. All the logic to kill the async thread is done in the destructor of TFilePrefetch which in turn is called from the destructor of TFileCacheRead. In the same file two lines below the destructor of TFileCacheRead is called. And initially TFilePrefetch held a pointer to the file object in TFileCacheRead which now is 0. Therefore, during the destruction of the TFilePrefetch object we don't have any longer a valid TFile pointer. So, we can not wait for the ongoing requests to be satisfied. This was the reason of the crash. To fix this, I removed the killing of the async thread form the destructor of the TFilePrefetch method and I've put it in a separate method called WaitFinishPrefetch. In this way, we avoid the potential scenario of trying to wait for some request for a file while not having a valid pointer to that file.

Revision 45494 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 8 19:03:13 2012 UTC (2 years, 5 months ago) by pcanal
File length: 25562 byte(s)
Diff to previous 45487
From Elvin:

I received a test program from an user in which the async prefetching was blocking. After doing some debugging I managed to fix the problem. The issue was that when prefetching and reaching the end of the entries, the program should stop trying to prefetch further if the current entry is equal to fEntryMax. 

This was not happening in the test program because there I am reading only some entries stopping well before the end of the total number of entries. The fix for this was the addition of a condition to FillBuffer around line 640.

Revision 45487 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 8 15:17:21 2012 UTC (2 years, 5 months ago) by pcanal
File length: 25559 byte(s)
Diff to previous 44841
From Elvin: white space and doc wording

Revision 44841 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 3 10:29:51 2012 UTC (2 years, 6 months ago) by pcanal
File length: 25735 byte(s)
Diff to previous 44785
Add an explicit 'Close' for the read cache so that we can insure that all the (concurrent) outstanding connection/use of the TFile are closed before closing the file

Revision 44785 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 27 20:38:24 2012 UTC (2 years, 6 months ago) by pcanal
File length: 25312 byte(s)
Diff to previous 44756
Add a non virtual SetEnablePrefetchingImpl to be called form the constructor and from the
virtual SetEnablePrefetching.
Make sure that even in the usual case (fEnablePrefetching == false), fAsyncReading is set.
Add documentation in the new functions.

Revision 44756 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 26 21:14:16 2012 UTC (2 years, 6 months ago) by pcanal
File length: 24554 byte(s)
Diff to previous 43149
From Brian:

When hooking prefetching up into the CMSSW configuration system, I found the attached patch necessary. 
Without it, if you change the prefetch settings after the cache is created, I/O operations cause a segfault.

Revision 43149 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 27 21:09:07 2012 UTC (2 years, 10 months ago) by pcanal
File length: 24125 byte(s)
Diff to previous 42754
From Peter:

Index: io/io/inc/TFileCacheRead.h
Index: io/io/src/TFileCacheRead.cxx
* Enhance Print() function to report number of bytes read and read calls for current cache rather than totals on associated file.
* Distingurish counter for bytes read and read calls for learning phase.

Index: tree/tree/src/TBasket.cxx
* When calling cache ReadBuffer(), update number of read calls and bytes read.

Revision 42754 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 20 20:13:07 2012 UTC (3 years ago) by pcanal
File length: 23376 byte(s)
Diff to previous 41698
From Peter van Gemmeren:

Allow multiple read caches per file by adding a fCacheReadMap member and owner arguments to GetCacheRead() and SetCacheRead()
to TFile.

Index: io/io/inc/TFileCacheRead.h
Index: io/io/src/TFileCacheRead.cxx
* Adding new argument for constructor to specify TTree owner
* whitespace indents

Index: tree/tree/inc/TBasket.h
Index: tree/tree/src/TBasket.cxx
* Add optional tree owner argument to LoadBasketBuffers() to retrieve cache.
* In LoadBasketBuffers() and ReadBuffers() check the cache first than call TFile::ReadBuffer only if needed.

Index: tree/tree/inc/TChain.h
Index: tree/tree/src/TChain.cxx
* Override SetCacheSize() function to update TTree owner on the current cache.
* whitespace indents

Index: tree/tree/src/TTree.cxx
* Get TTreeCache for current TTree, by specifying owner in GetCacheRead() calls
* Always delete owned cache

Index: tree/tree/src/TTreeCache.cxx
* Adding new argument for constructor for TFileCacheRead to specify TTree owner

Index: tree/treeplayer/src/TTreePlayer.cxx
* Get TTreeCache for current TTree, by specifying owner in GetCacheRead() calls

Index: tree/tree/src/TTreeCloner.cxx
* Call TBasket::LoadBasketBuffers() with current TTree as owner of cache

Index: proof/proofplayer/src/TEventIter.cxx
* Get TTreeCache for current TTree, by specifying owner in GetCacheRead() and SetCacheRead() calls

Revision 41698 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 1 21:22:54 2011 UTC (3 years, 2 months ago) by pcanal
File length: 23400 byte(s)
Diff to previous 40408
From Elvin:
Last week Martin Vala from ALICE came to me with a problem that he had
while using the asynchronous prefetching. There were basically two
main problems:

1. Trying to read a root file from an archive. Here the problem was
that when reading from an archive there is an offset of the file which
was not taken into consideration when the file was saved in the cache.
And this lead to a miss when reading the file from cache. I fixed it,
but I had to expose the value of fArchiveOffset from TFile.

2. The second problem was when reading using a TChain. There were some
synchronization issues concerned to the asynchronous thread that
actually does the reading. All this was happening because in the case
of TChain there is only one file cache which is re-utilized as we move
from one file to another. This was a pretty tricky issue.

I attached a patch made against the current trunk which fixes both
this problems. I gave the patch first to Martin to test it, and he was
satisfied with it. There is a small delay when the TChain moves from
one file to another because I have to wait for the async thread to
finish it's worked but over all Martin said that the performance is
way better than before. When I initially did the asyn pre-fetching I
had no idea about these two use cases, so that's why they popped up
now.



Revision 40408 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 1 20:07:54 2011 UTC (3 years, 5 months ago) by pcanal
File length: 23311 byte(s)
Diff to previous 39724
Upgrade the sorting algorithm to be able to handle the case where the same file block is requested multiple time (can happen in case of older unclustered files on which the TTreeCache is used

Revision 39724 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 14 19:12:39 2011 UTC (3 years, 7 months ago) by pcanal
File length: 22556 byte(s)
Diff to previous 39466
From Elvin:

additional checks before starting the prefetching thread and also I modify the way memory is deallocated when the destructor of the TFilePrefetch class is called. According to the documentation of TThread::Delete, when the object is allocated on the heap one should call directly delete which is what I added in the new patch.

Revision 39466 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 27 20:26:23 2011 UTC (3 years, 7 months ago) by pcanal
File length: 22425 byte(s)
Diff to previous 39344
Use one single spelling for PrefetchedBlocks

Revision 39344 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 23 14:42:43 2011 UTC (3 years, 8 months ago) by pcanal
File length: 22417 byte(s)
Diff to previous 39277
Fix coverity 29370,29371,29372,29373: Unitialized data member
29374: deadcode/memory leak.
29369,29368: sprintf

Revision 39277 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 19 18:54:57 2011 UTC (3 years, 8 months ago) by pcanal
File length: 22302 byte(s)
Diff to previous 39275
Migrate #include from include file to source

Revision 39275 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 19 18:17:37 2011 UTC (3 years, 8 months ago) by pcanal
File length: 22275 byte(s)
Diff to previous 34934
From Elvin Alin Sindrilaru:

The prefetching mechanism uses two new classes (TFilePrefetch.h and 
TFPBlock.h) to prefetch in advance a block of entries. There is a second 
thread which takes care of actually transferring the blocks and making 
them available to the main requesting thread. Therefore, the time spent 
by the main thread waiting for the data before processing considerably 
decreases. Besides the prefetching mechanisms there is also a local 
caching option which can be enabled by the user. Both capabilities are 
disabled by default and must be explicitly enabled by the user. 

In order to enable the prefetching the user must define the environment 
variable "TFile.AsyncPrefetching" as follows:
   gEnv->SetValue("TFile.AsyncPrefetching", 1). 
Only when the prefetching is enabled can the user set the local cache 
directory in which the file transferred can be saved. For subsequent 
reads of the same file the system will use the local copy of the file 
from cache. To set up a local cache directory, a client can use the 
following commands:

   TString cachedir="file:/tmp/xcache/";
   // or using xrootd on port 2000 
   // TString cachedir="root://localhost:2000//tmp/xrdcache1/";
   gEnv->SetValue("Cache.Directory", cachedir.Data());  

The "TFilePrefetch" class is responsible with actually reading and storing 
the requests received from the main thread. It also creates the working 
thread which will transfer all the information. Apart from managing the 
block requests, it also deals with caching the blocks on the local machine 
and retrieving them when necessary. 

The "TFPBlock" class represents the encapsulation of a block request. It 
contains the chunks to be prefetched and also serves as a container for 
the information read.

In order to accommodate the new prefetching mechanism the following files 
have suffered considerable modifications: TFileCacheRead.cxx/.h, 
TTreeCache.cxx/.h and to a less extent: TXNetFile.cxx, TFile.h. 
Basically in TFileCacheRead we've added the logic for dealing with the 
second buffer that is prefetched. In TTreeCache during prefeching the 
method FillBuffer is called after each read so that once the main thread 
starts reading from the last available  buffer, the second thread starts 
prefetching the next block.

Revision 34934 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 23 09:11:42 2010 UTC (4 years, 5 months ago) by brun
File length: 13200 byte(s)
Diff to previous 34444
Modify TFileCacheRead::Print such that it can be called from TTreeCache::Print

Revision 34444 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 16 02:17:39 2010 UTC (4 years, 6 months ago) by pcanal
File length: 13010 byte(s)
Diff to previous 34374
Avoid doing seeks on the physical file reprensation when it is not absolutely necessary
(i.e. it is not need if we are going to pick the data from our cache).
Introduce a SetOffset to change fOffset (i.e. the logical position in the file) without doing a lseek.
Introduce ReadBuffer(char * buf, Long64_t pos, Int_t len) to avoid the lseek when the data is in the cache.

See <http://savannah.cern.ch/bugs/?69845>

Revision 34374 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 12 08:09:36 2010 UTC (4 years, 6 months ago) by brun
File length: 13081 byte(s)
Diff to previous 34227
Remove a useless file seek

Revision 34227 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 30 12:09:39 2010 UTC (4 years, 6 months ago) by brun
File length: 13020 byte(s)
Diff to previous 32546
Fix format in Warning and Error statements

Revision 32546 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 11 10:45:26 2010 UTC (4 years, 10 months ago) by brun
File length: 13018 byte(s)
Diff to previous 32211
In TFileCacheRead::Sort, increase the maximum read from 2 to 16 MBytes.
I have added the following comment:
      //in the test below 16 MBytes is pure empirirical and may depend on the file system.
      //increasing this number must be done with care, as it may increase
      //the job real time (mismatch with OS buffers)

Revision 32211 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 4 15:29:04 2010 UTC (4 years, 11 months ago) by rdm
File length: 12799 byte(s)
Diff to previous 31457
From Tigran Mkrtchyan:
implement TFile::ReadBufferAsync() using posix_fadvise() which tells the
kernel which blocks we are going to read, so it can start loading these
blocks in the buffer cache. Works only on Linux for the time being.
Minimum speedup about 15%-20%.

Revision 31457 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 30 13:36:37 2009 UTC (5 years, 1 month ago) by brun
File length: 12716 byte(s)
Diff to previous 30909
From Fabrizio:
In TFileCacheRead add a new virtual function GetUnzipBuffer in order
to avoid InheritsFrom in TBasket::ReadBasketBuffers.

In TTreeCacheUnzip optimizations related to CPU cycles and memory.

Related fixes to TFileCacheRead. Also comment "if gDebug" statements.

In TXNetFile fixes related to the reporting of TTreePerfStats.

Revision 30909 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 29 07:23:02 2009 UTC (5 years, 2 months ago) by brun
File length: 12479 byte(s)
Diff to previous 30226
Implement an API to control the readahead cache size.
A new static member is added in TFile:
   static Int_t     fgReadaheadSize;         //Readahead buffer size
and the following corresponding getter and setter:
   static Int_t     GetReadaheadSize();
   static void      SetReadaheadSize(Int_t bufsize = 256000);
   
Following IO tests with Alice, Atlas and CMS files, the readahead size has been
set by default to 256 Kbytes.

Because the readahead algorithm reads more data than it is required when
reading the Tree, a new TFile data member has been added with the corresponding
getter:
   Long64_t    fBytesReadExtra; //Number of extra bytes (overhead) read by the readahead buffer
   Long64_t    GetBytesReadExtra() const { return fBytesReadExtra; }

When calling TTree::PrintCacheStats, in turn calling TFileCacheRead::Print
information about the readahead cache is printed as well as the corresponding 
read overhead.

Revision 30226 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 17 14:36:42 2009 UTC (5 years, 4 months ago) by brun
File length: 12362 byte(s)
Diff to previous 29892
Improve information printed by TTree::PrintCacheStats

Revision 29892 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 25 06:04:39 2009 UTC (5 years, 5 months ago) by brun
File length: 11746 byte(s)
Diff to previous 29887
Remove include of TXNetFile.h. Was already removed and reintroduced again in previous change.

Revision 29887 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 24 15:51:48 2009 UTC (5 years, 5 months ago) by rdm
File length: 11770 byte(s)
Diff to previous 29886
correct coding style.

Revision 29886 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 24 14:58:18 2009 UTC (5 years, 5 months ago) by brun
File length: 11791 byte(s)
Diff to previous 29879
From Fabrizio
Reimplement functionality for async mode without introducing a dependency of libRIO on TXNetFile

Revision 29879 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 24 10:46:58 2009 UTC (5 years, 5 months ago) by brun
File length: 11784 byte(s)
Diff to previous 29877
Remove a dependency of TFileCacheRead on TXNetFile

Revision 29877 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 24 09:14:46 2009 UTC (5 years, 5 months ago) by brun
File length: 11805 byte(s)
Diff to previous 26028
From Fabrizio:
Several optimizations related to the TreeCache and parallel unzipping.

Revision 26028 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 30 20:09:44 2008 UTC (6 years, 2 months ago) by brun
File length: 11978 byte(s)
Diff to previous 23685
From Lorenzo:
 this patch fixes some not-consistent usage of TMath::Sort. If it is not 
applied, the compilation will fail when I will change 

Tmath::Sort<Element,Index> (Long64 n, Element x, Index w) 

in 

Tmath::Sort<Element,Index> (Index n, Element x, Index w) 

to avoid some possible conversion errors from Long64 to Index

Revision 23685 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 7 15:18:39 2008 UTC (6 years, 8 months ago) by brun
File length: 11987 byte(s)
Diff to previous 23122
Introducing a parallel unzipping algorithm for pre-fetched buffers. Since we already know what buffers are going to be read, we can decompress a few of them in advance in an additional thread and give the impression that the data decompression comes for free (we gain up to 30% in reading intensive jobs).

The size of this unzipping cache is 20% the size of the TTreeCache and can be modified with TTreeCache::SetUnzipBufferSize(Long64_t bufferSize). Theoretically, we only need one buffer in advance but in practice we might fall short if the unzipping cache is too small (synchronization costs).

This experimental feature is disabled by default, to activate it use the static function TTreeCache::SetParallelUnzip(TTreeCacheUnzip::EParUnzipMode option = TTreeCacheUnzip::kEnable). The possible values to pass are: TTreeCacheUnzip::kEnable to enable it,TTreeCacheUnzip::kDisable to disable it and TTreeCacheUnzip::kForce to force it. Since it will only work if you have more than one core, the TTreeCacheUnzip::kForce option is useful to run it even if you have only one cpu (to measure the overhead, for example).

Revision 23122 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 10 14:56:30 2008 UTC (6 years, 9 months ago) by rdm
File length: 11870 byte(s)
Copied from: trunk/io/src/TFileCacheRead.cxx revision 23121
Diff to previous 20882
move the following directories into "io":

castor, chrip, dcache, gfal, io, rfio, sql, xml

Revision 20882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:31:26 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 11870 byte(s)
Diff to previous 20861
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 20861 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Nov 18 14:43:07 2007 UTC (7 years, 2 months ago) by brun
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 11870 byte(s)
Diff to previous 20693
From Gerri:
This adds a protection against 'buf = 0' when using TXNetFile without asynchronous reading.

Revision 20693 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 7 07:21:30 2007 UTC (7 years, 2 months ago) by brun
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 11830 byte(s)
Diff to previous 20692
Fix typo in previous fix.

Revision 20692 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 7 07:16:41 2007 UTC (7 years, 2 months ago) by brun
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 11812 byte(s)
Diff to previous 20488
From Gerri:
Fix an important bug introduced in the latest change by Fabrizio.

Revision 20488 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 25 13:22:56 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 11782 byte(s)
Diff to previous 20273
From Fabrizio & Gerri:
Patch enabling asynchronous reading via XROOTD; a new method TFile::ReadBufferAsync
  is introduced which gets appropriately overritten in TXNetFile .
  The new feature can be enabled / disabled via the env 'TFile.AsyncReading' in .rootrc,
  the default being ON.
  The patch also cleans up the netx section in the system.rootrc, by removing
  very old unused variables and commenting and setting appropriate default
  values for the others (no additions, except for the comments).

Revision 20273 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 9 09:57:18 2007 UTC (7 years, 3 months ago) by brun
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 8779 byte(s)
Diff to previous 19826
From Leo:
Fix a small bug when resizing buffers smaller than 10KB to an acceptable size (spotted by Fabrizio Furano).

Revision 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 8773 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 8829 byte(s)
Diff to previous 17819
remove :$ from tag line

Revision 17819 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Feb 9 10:16:07 2007 UTC (7 years, 11 months ago) by rdm
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 8839 byte(s)
Diff to previous 17306
correct cvs ident line (base/cont/meta -> io).

Revision 17306 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 12 16:03:17 2007 UTC (8 years ago) by brun
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 8841 byte(s)
Diff to previous 16620
   TMath::Abs, TMath::Min, TMath::Max, TMath::Sign, TMath::Range
These functions are unfortunately not defined in a standard way in std::

This include is referenced by a new version of TMath.h.
As a result, TMath.h is back compatible with the previous version.

TMathBase.h is used in place of TMath.h in all the classes
that will go into the future miniCore library.
TMath.h and the TMath implementation will go into a new math sub-directory.

TString.h uses TMathBase.h instead of TMath.h.
As a result, it was necessary to include "TMath.h" in some classes
assuming that TMath was included via TString and using other functions
than the ones defined in TMathBase.h
 ----------------------------------------------------------------------

Revision 16620 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 25 14:38:38 2006 UTC (8 years, 3 months ago) by brun
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 8824 byte(s)
Diff to previous 16566
From Leandro:
Fix a memory leak

Revision 16566 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 19 19:36:54 2006 UTC (8 years, 3 months ago) by pcanal
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 8783 byte(s)
Diff to previous 16134
Do a reset of all the blocks in SetFile

Revision 16134 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 26 16:28:32 2006 UTC (8 years, 5 months ago) by rdm
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 8715 byte(s)
Diff to previous 15682
- make cctor and assignment private
- correct some comments

Revision 15682 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 4 12:58:09 2006 UTC (8 years, 6 months ago) by brun
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 9204 byte(s)
Diff to previous 15626
From Leandro:
This fixes a small problem in TFileCacheRead that could lead to an
uncontrolled memory consumption in some cases.

Revision 15626 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 29 22:15:37 2006 UTC (8 years, 6 months ago) by rdm
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 9147 byte(s)
Diff to previous 15572
Several fixes in the new cache handling:
- TFile
   - GetBytesWritten() includes also the number of bytes still in the
     write cache
   - New method FlushWriteCache()
   - Call FlushWriteCache() also when closing files in raw mode
   - Call FlushWriteCache() also in Flush()
- TFileCacheWrite:
   - new method GetBytesInCache() returning bytes still in cache
     used by TFile::GetBytesWritten()
   - WriteBuffer() returns int iso bool, -1 write failure, 0 in case
     recusively called and 1 in case copied in cache
- TFileCacheRead:
   - ReadBuffer() returns int iso bool, -1 read failure, 0 in case not
    in cache and 1 in case read from cache.
- TTreeCache:
   - use int return type for ReadBuffer()
- TNetFile and TXNetFile:
   - call FlushWriteCache() in their Flush().

Revision 15572 - (view) (download) (as text) (annotate) - [select for diffs]
Added Tue Jun 27 14:36:28 2006 UTC (8 years, 6 months ago) by brun
Original Path: trunk/io/src/TFileCacheRead.cxx
File length: 9045 byte(s)
-Rename class TFilePrefetch -> TFileCacheRead
-Rename class TTreeFilePrefetch -> TTreeCache
-Add new class TFileCacheWrite that implements automatic caching
 when writing network files. This class replaces the previous class TCache.
-old TCache class deleted.
-TFileCacheRead can read buffers from the wite cache in TFileCacheWrite.
-As a result TFile::UseCache is obsolete. The function is kept for
  backward compatibility.
-Remove references to TCache from TXMLFile, TSQLFile, TwebFile, TNetFile
-remove pointer TFile::fCache
-Add pointers TFile::fCacheRead and TFile::fCacheWrite
-Remove members fMaxCacheSize and fPageSize from TChain

NOTE that it is recommended to
  rm -f base/src/*.d base/src/*.o
  rm -f net/src/*.d  net/src/*.o
  rm -f tree/src/*.d tree/src/*.o

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9