= Bdbuf improvements = [[TOC(Projects/GSoC/Bdbuf_improvements, depth=2)]] '''Mentors:''' Sebastian Huber '''Students:''' '''Status:''' Uninitiated. '''Introduction:''' The [http://www.rtems.org/onlinedocs/doxygen/cpukit/html/group__rtems__bdbuf.html Bdbuf] is the block device buffer management in RTEMS. It suffers from a number of inefficiencies that should be addressed and fixed. '''Goal:''' To improve the Bdbuf implementation in terms of its replacement strategy, disk api, driver api, and block prefetching. '''Requirements:''' Advanced C programming. Algorithmic evaluation and development. = Replacement Strategy = 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) Further information: * [http://en.wikipedia.org/wiki/Cache_algorithms Cache algorithms] * [http://en.wikipedia.org/wiki/Page_replacement_algorithm Page replacement algorithms] * [http://linux-mm.org/AdvancedPageReplacement Advanced page replacement] * [http://www.cse.ohio-state.edu/hpcs/WWW/HTML/IO-performance.html IO performance] * [http://en.wikipedia.org/wiki/Adaptive_replacement_cache ARC] * [http://www.cse.ohio-state.edu/hpcs/WWW/HTML/publications/papers/TR-02-6.pdf LIRS] * [http://www.cse.ohio-state.edu/hpcs/WWW/HTML/publications/papers/TR-05-3.pdf Clock PRO] = Disk API = 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. = Driver API = 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. = Prefetch Strategy = Implement a proper block prefetch strategy. The current read ahead approach is virtually useless.