Add a framework to prefetch in bcache. This framework is useful to extend current readahead in bcache, current simply append piece of data of a fixed length, which cannot increase performance well. The framework records every read request from a bcache device and send them to a userspace client, which calculates proper prefetch length ot each request and send them to kernel, and execute prefetch asynchronously.
Li Ruilin (5): bcache: add a framework to perform prefetch bcache: provide a switch to bypass all IO requests bcache: inflight prefetch requests block overlapped normal requests bcache: Delay to invalidate cache data in writearound write bcache: Add a sample of userspace prefetch client
Documentation/admin-guide/bcache.rst | 4 + drivers/md/bcache/Makefile | 2 +- drivers/md/bcache/acache.c | 591 +++++++++++++++++++++++++++ drivers/md/bcache/acache.h | 79 ++++ drivers/md/bcache/bcache.h | 8 +- drivers/md/bcache/btree.c | 4 +- drivers/md/bcache/request.c | 131 ++++-- drivers/md/bcache/request.h | 31 ++ drivers/md/bcache/stats.c | 13 + drivers/md/bcache/stats.h | 3 + drivers/md/bcache/super.c | 6 + drivers/md/bcache/sysfs.c | 12 + include/trace/events/bcache.h | 22 + samples/acache_client/Makefile | 13 + samples/acache_client/connect.c | 144 +++++++ samples/acache_client/connect.h | 74 ++++ samples/acache_client/main.c | 133 ++++++ 17 files changed, 1222 insertions(+), 48 deletions(-) create mode 100644 drivers/md/bcache/acache.c create mode 100644 drivers/md/bcache/acache.h create mode 100644 samples/acache_client/Makefile create mode 100644 samples/acache_client/connect.c create mode 100644 samples/acache_client/connect.h create mode 100644 samples/acache_client/main.c