I am pondering the fact that the txg is part of the hash key for the arc. It 
seems to me,
this has a profound implication: read caching is per txg. 

If I read a record into the cache in txg N, and the current txg is closed, this 
record 
becomes effectively un-cached in the new (N+1) txg.  

(Well, there may be some on-going operation that still references the txg N 
entry, 
but for read caching I believe this is correct) 

So the next read will have to read it from disk again, and put it into the arc 
again,
this time with txg N+1.
Now we have 2 arc entries for the same piece of data.  The entry for txg N will 
get
aged out of the cache eventually, 
but in theory, there may be potentially 
many entries of the same (identical data content and location) data block 
present 
in the arc,  if we keep re-reading the same block. 

Is my understanding correct?
-- 
This message posted from opensolaris.org

Reply via email to