diff options
| author | Cao Guanghui <caoguanghui@kylinos.cn> | 2026-06-01 13:49:07 +0800 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-06-01 17:55:31 +0200 |
| commit | af8ce933295b2ac18c744a9fc837f52a29737b51 (patch) | |
| tree | bf7dbabb45e924a275163056baca1691863f99b5 /include/linux/timerqueue_types.h | |
| parent | f9f57971da38afbcfa82a9502fb3eb5f1f100e73 (diff) | |
dm cache: make smq background work limit configurable
The maximum number of concurrent background work items (promotions,
demotions, writebacks) in the SMQ policy was hardcoded to 4096, with
a FIXME comment noting it should be made configurable.
This value was originally tuned down from 10240 to balance memory
overhead (~128 bytes per entry, ~512KB at 4096 entries) against I/O
parallelism. However, different workloads and cache sizes may benefit
from different limits:
- Write-heavy workloads may need more writeback concurrency
- Very large caches (10+ TB) may need more promotion slots
- Memory-constrained systems may want a lower limit
Make this configurable via the module parameter "smq_max_background_work"
(defaulting to 4096 to preserve existing behaviour). Clamp the value to
at least 1 to prevent setting 0, which would block all background work.
The parameter only affects newly created cache devices; existing caches
retain their value from creation time.
Signed-off-by: Cao Guanghui <caoguanghui@kylinos.cn>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'include/linux/timerqueue_types.h')
0 files changed, 0 insertions, 0 deletions
