Changes between Version 1 and Version 2 of ReadonlyProtection


Ignore:
Timestamp:
2006-11-20T04:41:44+01:00 (7 years ago)
Author:
chrisbolt
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ReadonlyProtection

    v1 v2  
    11= Readonly Protection = 
    22 
    3 Readonly Protection is a mechanism used in XCache to make it more stable. It is implemented by mmap'ing twice on same memory, 1 for read/write(rw) and the other for readonly(ro). XCache store data into rw cache, and fix the pointers up to ro cache, so all access if read from the ro memory. 
     3Readonly Protection is a mechanism used in XCache to make it more stable. It is implemented by mmap'ing twice on same memory, 1 for read/write(rw) and the other for readonly(ro). XCache stores data into rw cache, and fix the pointers up to ro cache, so all access is read from the ro memory. 
    44 
    5 The cache can be currupted by accident, e.g., if some pointer isn't handled when copy from cache, some php/extension may write to the cache by this pointer currupting the cache. The cache with readonly permission won't allow this happen. 
     5The cache can be corrupted by accident, e.g., if some pointer isn't handled when copying from cache, some php/extension may write to the cache with this pointer, corrupting the cache. The cache with readonly permission won't allow this happen. 
    66 
    7 Does it ever help? Yes, it helped when i was developing XCache, figuring out bugs between XCache and php core. 
     7Does it ever help? Yes, it helped when I was developing XCache, figuring out bugs between XCache and php core. 
    88 
    9 You can grant performance by shadow-copying some data, i.e.: some of the data can be accessed by the php executor in cache directly, without copying them to emalloc'ed memory, but only when these requirement meet: 
     9You can grant performance by shadow-copying some data, i.e.: some of the data can be accessed by the php executor in cache directly, without copying them to emalloc'ed memory, but only when these requirements are met: 
    1010 * the executor read the data, but never write it 
    1111 * the executor never efree() the pointer already, or you can trick it so.