linux/drivers/md/bcache
Coly Li d5d6b58872 bcache: add readahead cache policy options via sysfs interface
commit 038ba8cc1b upstream.

In year 2007 high performance SSD was still expensive, in order to
save more space for real workload or meta data, the readahead I/Os
for non-meta data was bypassed and not cached on SSD.

In now days, SSD price drops a lot and people can find larger size
SSD with more comfortable price. It is unncessary to alway bypass
normal readahead I/Os to save SSD space for now.

This patch adds options for readahead data cache policies via sysfs
file /sys/block/bcache<N>/readahead_cache_policy, the options are,
- "all": cache all readahead data I/Os.
- "meta-only": only cache meta data, and bypass other regular I/Os.

If users want to make bcache continue to only cache readahead request
for metadata and bypass regular data readahead, please set "meta-only"
to this sysfs file. By default, bcache will back to cache all read-
ahead requests now.

Cc: stable@vger.kernel.org
Signed-off-by: Coly Li <colyli@suse.de>
Acked-by: Eric Wheeler <bcache@linux.ewheeler.net>
Cc: Michael Lyle <mlyle@lyle.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11 04:35:37 -08:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile
alloc.c bcache: fix deadlock in bcache_allocator 2019-12-31 16:45:30 +01:00
bcache.h bcache: add readahead cache policy options via sysfs interface 2020-02-11 04:35:37 -08:00
bset.c bcache: make bset_search_tree() be more understandable 2019-06-28 07:39:15 -06:00
bset.h bcache: fix stack corruption by PRECEDING_KEY() 2019-06-13 03:09:14 -06:00
btree.c bcache: at least try to shrink 1 node in bch_mca_scan() 2020-01-04 19:18:11 +01:00
btree.h bcache: fix race in btree_flush_write() 2019-06-28 07:39:18 -06:00
closure.c closures: fix a race on wakeup from closure_sync 2019-09-03 08:08:31 -06:00
closure.h
debug.c bcache: Fix an error code in bch_dump_read() 2019-09-03 08:08:29 -06:00
debug.h
extents.c
extents.h
io.c bcache: ignore read-ahead request failure on backing device 2019-06-28 07:39:14 -06:00
journal.c bcache: add reclaimed_journal_buckets to struct cache_set 2019-06-28 07:39:18 -06:00
journal.h bcache: performance improvement for btree_flush_write() 2019-06-28 07:39:18 -06:00
movinggc.c
request.c bcache: add readahead cache policy options via sysfs interface 2020-02-11 04:35:37 -08:00
request.h bcache: Clean up bch_get_congested() 2019-04-24 10:56:27 -06:00
stats.c
stats.h
super.c bcache: fix deadlock in bcache_allocator 2019-12-31 16:45:30 +01:00
sysfs.c bcache: add readahead cache policy options via sysfs interface 2020-02-11 04:35:37 -08:00
sysfs.h
trace.c
util.c
util.h bcache: Revert "bcache: fix high CPU occupancy during journal" 2019-06-28 07:39:17 -06:00
writeback.c bcache: fix potential deadlock in cached_def_free() 2019-06-28 07:39:16 -06:00
writeback.h