genodelabs/genode — Issue #113: Block cache
Author: nfeske
Created: 2012-02-14 11:14:25+00:00
State: open
Labels: feature

Currently, there exists only the iso9660 server that is able to cache block accesses. A generic solution for caching block-device accesses would be nice. One suggestion is a component that requests a block session (routed to a block device driver) as back end and also announces a block service (front end) itself. Such a block-cache server waits for requests at the front end and forwards them to the back end. But it uses its own memory to cache blocks.

The first version could support only read-only block devices (such as CDROM) by caching the results of read accesses. In this version, we already need an eviction strategy that kicks in once the block cache gets saturated. For a start this could be FIFO or LRU (least recently used).

A more sophisticated version would support write accesses, too. Here we need a way to sync blocks to the back end at regular intervals in order to guarantee that all block-write accesses are becoming persistent after a certain time. We would also need a way to explicitly flush the block cache (i.e., when the front-end block session gets closed).