Signed-off-by: Eric Wheeler <bcache@xxxxxxxxxxxxxxxxxx> --- Documentation/bcache.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Documentation/bcache.txt b/Documentation/bcache.txt index a9259b5..c87d73f 100644 --- a/Documentation/bcache.txt +++ b/Documentation/bcache.txt @@ -133,6 +133,31 @@ the backing devices to passthrough mode. writeback mode). It currently doesn't do anything intelligent if it fails to read some of the dirty data, though. +PER-PROCESS CACHE HINTING BY PRIORITY +------------------------------------- + +Processes can be assigned an IO priority using `ionice` and bcache will +either try to writeback or bypass the cache based on the IO priority +level assigned to the process. + +Cache hinting is configurable by writing 'class,level' pairs to sysfs. +These are the defaults: + echo 2,7 > /sys/block/bcache0/bcache/ioprio_bypass + echo 2,0 > /sys/block/bcache0/bcache/ioprio_writeback + +By default, Linux assigns processes the best-effort class with a class +level of 4. Thus, if you do nothing, your default processes will follow +the original bcache should_writeback/should_bypass logic. + + (-p) IO Class (-n) Class level Action + ----------------------------------------------------- + (1) Realtime 0-7 Writeback + (2) Best-effort 0 Writeback + (2) Best-effort 1-6 Original bcache logic + (2) Best-effort 7 Bypass cache + (3) Idle n/a Bypass cache + +See `man ionice` for more detail about process IO priority in Linux. HOWTO/COOKBOOK -------------- -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html