Spdk/lib/bdev/ocf
Vitaliy Mysak 38031e742c ocf: implement OCF cleaner
Implement cleaner that is used in WriteBack mode.

Cleaner is a background agent that does synchronization
 of data between cache and its cores.
 Cleaner usually runs every ~20 seconds to perform cleaning.
 The synchronization is a simmilar operation to OCF management flushes.
We need cleaner for WriteBack because only WriteBack mode
 produces dirty data that cleaner needs to deal with.
Cleaner requires adopting trylock() because in current version
 cleaner uses management lock when performs cleaning,
 which may lead to deadlocks if cleaner runs on
 the same thread as management operations.

WriteBack mode is fully functional after this change,
  but persistent metadata support is required to use it for production.

Cleaner will run on management thread for now.
  We plan to implement functionality of
  chosing a CPU core where cleaner should run.
Cleaning policy is not configurable yet.
  The default is ALRU with 20 sec interval.

Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448537 (master)

(cherry picked from commit 80a2ff01f3)
Change-Id: I35aa7e00c44e0d7a77e64e60df1f66f20be03f55
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457258
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-17 15:25:31 +00:00
..
env ocf: update try-locks in env 2019-04-19 13:05:35 +00:00
ctx.c ocf: implement OCF cleaner 2019-06-17 15:25:31 +00:00
ctx.h ocf: implement OCF cleaner 2019-06-17 15:25:31 +00:00
data.c OCF: add OCF module 2019-01-28 09:41:52 +00:00
data.h OCF: add OCF module 2019-01-28 09:41:52 +00:00
Makefile OCF: add OCF module 2019-01-28 09:41:52 +00:00
stats.c OCF: rebase to ocf master 276d91fcd7 2019-03-05 12:09:25 +00:00
stats.h OCF: rebase to ocf master 276d91fcd7 2019-03-05 12:09:25 +00:00
utils.c ocf: add timeout functionality for vbdev_ocf_mngt_ interface 2019-06-17 10:02:50 +00:00
utils.h ocf: add timeout functionality for vbdev_ocf_mngt_ interface 2019-06-17 10:02:50 +00:00
vbdev_ocf_rpc.c ocf: add callback argument to vbdev_ocf_construct() 2019-06-12 13:09:46 +00:00
vbdev_ocf.c ocf: create management channel 2019-06-17 15:25:31 +00:00
vbdev_ocf.h ocf: create management channel 2019-06-17 15:25:31 +00:00
volume.c ocf: implement OCF cleaner 2019-06-17 15:25:31 +00:00
volume.h OCF: rebase to ocf master 276d91fcd7 2019-03-05 12:09:25 +00:00