mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
dm cache policy mq: simplify ability to promote sequential IO to the cache
Before, if the user wanted sequential IO to be promoted to the cache they'd have to set sequential_threshold to some nebulous large value. Now, the user may easily disable sequential IO detection (and sequential IO's implicit bypass of the cache) by setting sequential_threshold to 0. Signed-off-by: Mike Snitzer <[email protected]>
This commit is contained in:
parent
b155aa0e5a
commit
f1afb36a61
2 changed files with 15 additions and 8 deletions
|
|
@ -865,7 +865,8 @@ static int map(struct mq_policy *mq, dm_oblock_t oblock,
|
|||
if (e && in_cache(mq, e))
|
||||
r = cache_entry_found(mq, e, result);
|
||||
|
||||
else if (iot_pattern(&mq->tracker) == PATTERN_SEQUENTIAL)
|
||||
else if (mq->tracker.thresholds[PATTERN_SEQUENTIAL] &&
|
||||
iot_pattern(&mq->tracker) == PATTERN_SEQUENTIAL)
|
||||
result->op = POLICY_MISS;
|
||||
|
||||
else if (e)
|
||||
|
|
@ -1290,7 +1291,7 @@ bad_pre_cache_init:
|
|||
|
||||
static struct dm_cache_policy_type mq_policy_type = {
|
||||
.name = "mq",
|
||||
.version = {1, 2, 0},
|
||||
.version = {1, 3, 0},
|
||||
.hint_size = 4,
|
||||
.owner = THIS_MODULE,
|
||||
.create = mq_create
|
||||
|
|
@ -1298,7 +1299,7 @@ static struct dm_cache_policy_type mq_policy_type = {
|
|||
|
||||
static struct dm_cache_policy_type default_policy_type = {
|
||||
.name = "default",
|
||||
.version = {1, 2, 0},
|
||||
.version = {1, 3, 0},
|
||||
.hint_size = 4,
|
||||
.owner = THIS_MODULE,
|
||||
.create = mq_create,
|
||||
|
|
|
|||
Loading…
Reference in a new issue