The Bdbuf is the block device buffer management in RTEMS.
Bdbuf uses currently the LRU replacement strategy. This was easy to implement but has several severe drawbacks. Due to patent issues we should use LIRS instead of ARC. Steps to move from LRU to LIRS:
- Define a set of benchmarks
- Add test cases for LIRS
- Implement LIRS
- Run the benchmark with Bdbuf based on LRU and LIRS (optionally also ARC)
- Cache algorithms
- Page replacement algorithms
- Advanced page replacement
- IO performance
- Clock PRO
The access by device identifier should be replaced with the disk device structure. This avoids the look up overhead and ensures that the disks have a proper usage count.
The driver API should be changed to use the buffer chains directly. Currently a table is allocated on the stack to hold the request structure.
Implement a proper block prefetch strategy. The current read ahead approach is virtually useless.