ocf/inc
David Lee 6184ad7759 alru: add parameter `max_dirty_ratio'
With a high dirty ratio and occupancy, OCF might unable to map cache lines
for new requests, thus pass-through the I/O to core devices.  IOPS will
drop afterwards.  We need to control the dirty ratio.

Existing `alru' policy gives user the chance to control the stale buffer
time, activity threshold etc.  They can affect the dirty ratio of the cache
device, but in an empirical manner, more or less.  Introducing
`max_dirty_ratio' can make it explicit.

At first glance, it might be better to implement a dedicated cleaner policy
directly targeting dirty ratio goal, so that the `alru' parameters remains
orthogonal.  But one the other hand, we still need to flush dirty cache
lines periodically, instead of just keeping a watermark of dirty ratio.
It indicates that existing `alru' parameters are still required if we
develop a new policy, and it seems reasonable to make it a parameter.

To sum up, this patch does the following:
- added a 'max_dirty_ratio' parameter with default value 100;
- with default value 100, `alru' cleaner is identical to what is was;
- with value N less than 100, the cleaner (when waken up) will active
  brought dirty ratio to N, regardless of staleness time.

Signed-off-by: David Lee <live4thee@gmail.com>
2022-10-01 17:48:14 +08:00
..
cleaning alru: add parameter `max_dirty_ratio' 2022-10-01 17:48:14 +08:00
promotion Fix license 2021-10-28 13:08:50 +02:00
ocf_cache.h Redesign failover standby API 2021-12-29 20:31:40 +01:00
ocf_cfg.h Fix license 2021-10-28 13:08:50 +02:00
ocf_cleaner.h Fix license 2021-10-28 13:08:50 +02:00
ocf_composite_volume.h expose composite volume type id in API 2022-06-13 11:40:08 +02:00
ocf_core.h Remove ocf_core_new_io 2022-03-28 10:36:19 +02:00
ocf_ctx.h Fix license 2021-10-28 13:08:50 +02:00
ocf_debug.h Fix license 2021-10-28 13:08:50 +02:00
ocf_def.h Remove "metadata_layout" parameter of the cache 2022-03-07 17:48:25 +01:00
ocf_err.h Add option to disable cleaner 2022-04-28 13:04:27 +02:00
ocf_io_class.h Fix license 2021-10-28 13:08:50 +02:00
ocf_io.h Fix license 2021-10-28 13:08:50 +02:00
ocf_logger.h Fix compilation error regarding stdarg.h file 2022-02-07 15:10:01 +02:00
ocf_metadata.h Remove ocf_metadata_probe_cores() implementation 2022-03-04 19:13:40 +01:00
ocf_mngt.h a few typo fixes 2022-10-01 17:48:07 +08:00
ocf_queue.h Fix license 2021-10-28 13:08:50 +02:00
ocf_stats.h Fix license 2021-10-28 13:08:50 +02:00
ocf_types.h Fix license 2021-10-28 13:08:50 +02:00
ocf_volume.h Introduce on_init/on_deinit ops in ocf_volume interface 2022-06-02 09:49:39 +02:00
ocf.h Introduce composite volume 2022-06-02 09:49:39 +02:00