Merge tag 'arm64-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[firefly-linux-kernel-4.4.55.git] / Documentation / device-mapper / cache-policies.txt
index df52a849957ffacc99961a040032fc9ec8918cd0..66c2774c0c64c0e8bf3a9aadc2a6f1b8102b5a12 100644 (file)
@@ -40,8 +40,11 @@ on hit count on entry. The policy aims to take different cache miss
 costs into account and to adjust to varying load patterns automatically.
 
 Message and constructor argument pairs are:
-       'sequential_threshold <#nr_sequential_ios>' and
-       'random_threshold <#nr_random_ios>'.
+       'sequential_threshold <#nr_sequential_ios>'
+       'random_threshold <#nr_random_ios>'
+       'read_promote_adjustment <value>'
+       'write_promote_adjustment <value>'
+       'discard_promote_adjustment <value>'
 
 The sequential threshold indicates the number of contiguous I/Os
 required before a stream is treated as sequential.  The random threshold
@@ -55,6 +58,15 @@ since spindles tend to have good bandwidth. The io_tracker counts
 contiguous I/Os to try to spot when the io is in one of these sequential
 modes.
 
+Internally the mq policy maintains a promotion threshold variable.  If
+the hit count of a block not in the cache goes above this threshold it
+gets promoted to the cache.  The read, write and discard promote adjustment
+tunables allow you to tweak the promotion threshold by adding a small
+value based on the io type.  They default to 4, 8 and 1 respectively.
+If you're trying to quickly warm a new cache device you may wish to
+reduce these to encourage promotion.  Remember to switch them back to
+their defaults after the cache fills though.
+
 cleaner
 -------