mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
dm cache: add mq policy
A cache policy that uses a multiqueue ordered by recent hit count to select which blocks should be promoted and demoted. This is meant to be a general purpose policy. It prioritises reads over writes. Signed-off-by: Joe Thornber <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
This commit is contained in:
parent
c6b4fcbad0
commit
f283635281
4 changed files with 1279 additions and 0 deletions
|
|
@ -281,6 +281,16 @@ config DM_CACHE
|
|||
algorithms used to select which blocks are promoted, demoted,
|
||||
cleaned etc. It supports writeback and writethrough modes.
|
||||
|
||||
config DM_CACHE_MQ
|
||||
tristate "MQ Cache Policy (EXPERIMENTAL)"
|
||||
depends on DM_CACHE
|
||||
default y
|
||||
---help---
|
||||
A cache policy that uses a multiqueue ordered by recent hit
|
||||
count to select which blocks should be promoted and demoted.
|
||||
This is meant to be a general purpose policy. It prioritises
|
||||
reads over writes.
|
||||
|
||||
config DM_MIRROR
|
||||
tristate "Mirror target"
|
||||
depends on BLK_DEV_DM
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ dm-log-userspace-y \
|
|||
+= dm-log-userspace-base.o dm-log-userspace-transfer.o
|
||||
dm-thin-pool-y += dm-thin.o dm-thin-metadata.o
|
||||
dm-cache-y += dm-cache-target.o dm-cache-metadata.o dm-cache-policy.o
|
||||
dm-cache-mq-y += dm-cache-policy-mq.o
|
||||
md-mod-y += md.o bitmap.o
|
||||
raid456-y += raid5.o
|
||||
|
||||
|
|
@ -46,6 +47,7 @@ obj-$(CONFIG_DM_RAID) += dm-raid.o
|
|||
obj-$(CONFIG_DM_THIN_PROVISIONING) += dm-thin-pool.o
|
||||
obj-$(CONFIG_DM_VERITY) += dm-verity.o
|
||||
obj-$(CONFIG_DM_CACHE) += dm-cache.o
|
||||
obj-$(CONFIG_DM_CACHE_MQ) += dm-cache-mq.o
|
||||
|
||||
ifeq ($(CONFIG_DM_UEVENT),y)
|
||||
dm-mod-objs += dm-uevent.o
|
||||
|
|
|
|||
1195
drivers/md/dm-cache-policy-mq.c
Normal file
1195
drivers/md/dm-cache-policy-mq.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue