[haiku-development] Re: gsoc2010: File systems

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 01 Apr 2010 11:47:44 +0200

On 2010-04-01 at 10:29:43 [+0200], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
wrote:
> Janito Ferreira Filho <jvffprog@xxxxxxxxxxx> wrote:
> > does the block cache and file cache operate in a similar fashion to
> > the
> > Linux buffer and page cache? If so, the unification would then be to
> > use
> > the file cache to manage the VM structures and the block cache would
> > be based on the file cache?
> 
> I'm afraid I'm not familiar enough with Linux to answer that one.
> How the unification works is still a bit blurry to me, as I haven't
> given it too much thought yet; maybe Ingo has done more in this regard
> already ;-)

No, it's a rather vague idea ATM. Basically once the file cache supports 
transactions, using a file cache on top of a block device would already 
come pretty close to what a block cache has to do. Moreover Haiku's file 
systems generally also allow mounting files (instead of just block 
devices), in which case we already have a file cache at hand. And finally 
using a VMCache backing also for block devices would give us a better 
integration with the VM, allowing us to mmap() block devices and resulting 
in a more balanced reuse of cached data and meta data.

The major difference between file and block cache is the API used by the 
file system. The block cache strictly works with block sized units and 
needs to (temporarily) map them into memory. It needs to handle both block 
sizes less than, equal to, and greater than the page size.

ATM I see no problem in principle, but the idea needs to be fleshed out 
more in detail.

CU, Ingo

Other related posts: