diff options
29 files changed, 767 insertions, 321 deletions
diff --git a/Documentation/device-mapper/cache-policies.txt b/Documentation/device-mapper/cache-policies.txt index df52a849957f..66c2774c0c64 100644 --- a/Documentation/device-mapper/cache-policies.txt +++ b/Documentation/device-mapper/cache-policies.txt | |||
| @@ -40,8 +40,11 @@ on hit count on entry. The policy aims to take different cache miss | |||
| 40 | costs into account and to adjust to varying load patterns automatically. | 40 | costs into account and to adjust to varying load patterns automatically. |
| 41 | 41 | ||
| 42 | Message and constructor argument pairs are: | 42 | Message and constructor argument pairs are: |
| 43 | 'sequential_threshold <#nr_sequential_ios>' and | 43 | 'sequential_threshold <#nr_sequential_ios>' |
| 44 | 'random_threshold <#nr_random_ios>'. | 44 | 'random_threshold <#nr_random_ios>' |
| 45 | 'read_promote_adjustment <value>' | ||
| 46 | 'write_promote_adjustment <value>' | ||
| 47 | 'discard_promote_adjustment <value>' | ||
| 45 | 48 | ||
| 46 | The sequential threshold indicates the number of contiguous I/Os | 49 | The sequential threshold indicates the number of contiguous I/Os |
| 47 | required before a stream is treated as sequential. The random threshold | 50 | 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 | |||
| 55 | contiguous I/Os to try to spot when the io is in one of these sequential | 58 | contiguous I/Os to try to spot when the io is in one of these sequential |
| 56 | modes. | 59 | modes. |
| 57 | 60 | ||
| 61 | Internally the mq policy maintains a promotion threshold variable. If | ||
| 62 | the hit count of a block not in the cache goes above this threshold it | ||
| 63 | gets promoted to the cache. The read, write and discard promote adjustment | ||
| 64 | tunables allow you to tweak the promotion threshold by adding a small | ||
| 65 | value based on the io type. They default to 4, 8 and 1 respectively. | ||
| 66 | If you're trying to quickly warm a new cache device you may wish to | ||
| 67 | reduce these to encourage promotion. Remember to switch them back to | ||
| 68 | their defaults after the cache fills though. | ||
| 69 | |||
| 58 | cleaner | 70 | cleaner |
| 59 | ------- | 71 | ------- |
| 60 | 72 | ||
diff --git a/Documentation/device-mapper/cache.txt b/Documentation/device-mapper/cache.txt index 719320b5ed3f..e6b72d355151 100644 --- a/Documentation/device-mapper/cache.txt +++ b/Documentation/device-mapper/cache.txt | |||
| @@ -217,36 +217,43 @@ the characteristics of a specific policy, always request it by name. | |||
| 217 | Status | 217 | Status |
| 218 | ------ | 218 | ------ |
| 219 | 219 | ||
| 220 | <#used metadata blocks>/<#total metadata blocks> <#read hits> <#read misses> | 220 | <metadata block size> <#used metadata blocks>/<#total metadata blocks> |
| 221 | <#write hits> <#write misses> <#demotions> <#promotions> <#blocks in cache> | 221 | <cache block size> <#used cache blocks>/<#total cache blocks> |
| 222 | <#dirty> <#features> <features>* <#core args> <core args>* <#policy args> | 222 | <#read hits> <#read misses> <#write hits> <#write misses> |
| 223 | <policy args>* | 223 | <#demotions> <#promotions> <#dirty> <#features> <features>* |
| 224 | 224 | <#core args> <core args>* <policy name> <#policy args> <policy args>* | |
| 225 | #used metadata blocks : Number of metadata blocks used | 225 | |
| 226 | #total metadata blocks : Total number of metadata blocks | 226 | metadata block size : Fixed block size for each metadata block in |
| 227 | #read hits : Number of times a READ bio has been mapped | 227 | sectors |
| 228 | #used metadata blocks : Number of metadata blocks used | ||
| 229 | #total metadata blocks : Total number of metadata blocks | ||
| 230 | cache block size : Configurable block size for the cache device | ||
| 231 | in sectors | ||
| 232 | #used cache blocks : Number of blocks resident in the cache | ||
| 233 | #total cache blocks : Total number of cache blocks | ||
| 234 | #read hits : Number of times a READ bio has been mapped | ||
| 228 | to the cache | 235 | to the cache |
| 229 | #read misses : Number of times a READ bio has been mapped | 236 | #read misses : Number of times a READ bio has been mapped |
| 230 | to the origin | 237 | to the origin |
| 231 | #write hits : Number of times a WRITE bio has been mapped | 238 | #write hits : Number of times a WRITE bio has been mapped |
| 232 | to the cache | 239 | to the cache |
| 233 | #write misses : Number of times a WRITE bio has been | 240 | #write misses : Number of times a WRITE bio has been |
| 234 | mapped to the origin | 241 | mapped to the origin |
| 235 | #demotions : Number of times a block has been removed | 242 | #demotions : Number of times a block has been removed |
| 236 | from the cache | 243 | from the cache |
| 237 | #promotions : Number of times a block has been moved to | 244 | #promotions : Number of times a block has been moved to |
| 238 | the cache | 245 | the cache |
| 239 | #blocks in cache : Number of blocks resident in the cache | 246 | #dirty : Number of blocks in the cache that differ |
| 240 | #dirty : Number of blocks in the cache that differ | ||
| 241 | from the origin | 247 | from the origin |
| 242 | #feature args : Number of feature args to follow | 248 | #feature args : Number of feature args to follow |
| 243 | feature args : 'writethrough' (optional) | 249 | feature args : 'writethrough' (optional) |
| 244 | #core args : Number of core arguments (must be even) | 250 | #core args : Number of core arguments (must be even) |
| 245 | core args : Key/value pairs for tuning the core | 251 | core args : Key/value pairs for tuning the core |
| 246 | e.g. migration_threshold | 252 | e.g. migration_threshold |
| 247 | #policy args : Number of policy arguments to follow (must be even) | 253 | policy name : Name of the policy |
| 248 | policy args : Key/value pairs | 254 | #policy args : Number of policy arguments to follow (must be even) |
| 249 | e.g. 'sequential_threshold 1024 | 255 | policy args : Key/value pairs |
| 256 | e.g. sequential_threshold | ||
| 250 | 257 | ||
| 251 | Messages | 258 | Messages |
| 252 | -------- | 259 | -------- |
diff --git a/Documentation/device-mapper/thin-provisioning.txt b/Documentation/device-mapper/thin-provisioning.txt index 50c44cf79b0e..8a7a3d46e0da 100644 --- a/Documentation/device-mapper/thin-provisioning.txt +++ b/Documentation/device-mapper/thin-provisioning.txt | |||
| @@ -235,6 +235,8 @@ i) Constructor | |||
| 235 | read_only: Don't allow any changes to be made to the pool | 235 | read_only: Don't allow any changes to be made to the pool |
| 236 | metadata. | 236 | metadata. |
| 237 | 237 | ||
| 238 | error_if_no_space: Error IOs, instead of queueing, if no space. | ||
| 239 | |||
| 238 | Data block size must be between 64KB (128 sectors) and 1GB | 240 | Data block size must be between 64KB (128 sectors) and 1GB |
| 239 | (2097152 sectors) inclusive. | 241 | (2097152 sectors) inclusive. |
| 240 | 242 | ||
| @@ -276,6 +278,11 @@ ii) Status | |||
| 276 | contain the string 'Fail'. The userspace recovery tools | 278 | contain the string 'Fail'. The userspace recovery tools |
| 277 | should then be used. | 279 | should then be used. |
| 278 | 280 | ||
| 281 | error_if_no_space|queue_if_no_space | ||
| 282 | If the pool runs out of data or metadata space, the pool will | ||
| 283 | either queue or error the IO destined to the data device. The | ||
| 284 | default is to queue the IO until more space is added. | ||
| 285 | |||
| 279 | iii) Messages | 286 | iii) Messages |
| 280 | 287 | ||
| 281 | create_thin <dev id> | 288 | create_thin <dev id> |
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index f2ccbc3b9fe4..9a06fe883766 100644 --- a/drivers/md/Kconfig +++ b/drivers/md/Kconfig | |||
| @@ -176,8 +176,12 @@ config MD_FAULTY | |||
| 176 | 176 | ||
| 177 | source "drivers/md/bcache/Kconfig" | 177 | source "drivers/md/bcache/Kconfig" |
| 178 | 178 | ||
