On 09/04/2011 04:24 PM, Michal Novotny wrote:
On 09/02/2011 09:58 PM, Jason Duell wrote:
I'm not suggesting we ape chromium thoughtlessly, but their cache does
recover from crashes w/o using fsync AFAICT--see
https://bugzilla.mozilla.org/show_bug.cgi?id=681085#c6
We should at least understand their design.
Jason
They don't recover from crashes. They detect corrupted cache on the
fly and delete the whole cache too. The difference is that they
_could_ survive a crash and that they are able to detect corrupted cache.
http://www.chromium.org/developers/design-documents/network-stack/disk-cache#TOC-Data-Integrity
The basic design there sounds promising. Would a basic strategy like
theirs work for us?
1) memory map critical parts of the cache (map? other things?). Does
msync behave better than fsync (i.e. not block as much IO, for as long?)
2) write rest of code to be able to detect failures (and blow away cache
when they're discovered)
Jason
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network