Unify File System Caches
|Reported by:||axeld||Owned by:||nobody|
The Haiku kernel provides two kinds of caches for use by file system implementations: the file cache and the block cache. The file cache uses physical memory pages directly and it is linked with the VM subsystem, so that pages used for caching are freed automatically (in a least recently used order) when running low on free memory. The block cache, however, uses mapped memory (via the slab allocator) and freeing memory in low memory situations is handled via the low resource manager. Using different mechanisms to deal with low free memory situations leads to a caching imbalance in favor of the block cache. Furthermore the block cache uses large amounts of kernel address space, which can be problematic on 32 bit architectures.
The goal is to create a common underlying mechanism (using
VMCache) to unify both caches. Solutions must be found to interesting problems like how to deal with different block sizes (not necessarily matching the page size) and how to map support for transactions to