Skip to content

Repartition data after loading IO class configuration - #881

Merged
robertbaldyga merged 6 commits into
Open-CAS:masterfrom
Deixx:ioclass-repart
Oct 16, 2026
Merged

robertbaldyga merged 6 commits into
Open-CAS:masterfrom
Deixx:ioclass-repart

Conversation

@Deixx

@Deixx Deixx commented Apr 16, 2025

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/ocf_lru.c Resolved
Comment thread src/ocf_lru.c Resolved
Comment thread src/ocf_lru.c Resolved
Comment thread src/mngt/ocf_mngt_io_class.c Resolved
@Deixx
Deixx marked this pull request as draft April 23, 2025 05:46
@robertbaldyga
robertbaldyga marked this pull request as ready for review October 16, 2026 17:18
dmadej-hw and others added 4 commits October 16, 2026 19:36
Add ocf_user_part_move_all() moving all cache lines of a user partition
to another one. It's meant to be called under exclusive metadata access,
which keeps out every concurrent metadata update, so cache line locks
are not needed and lines held by in-flight requests are moved as well.

Moved lines are inserted at the cold end of the destination LRU lists
(new ocf_lru_repart_cold()), preserving their relative order, so they
neither displace hot data of the destination partition nor trigger its
hot/cold rebalancing.

The per-line part (cleaning policy and per-core counters update) is
factored out of ocf_user_part_move() and shared by both paths.

Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Add a per IO class `repart` flag to struct ocf_mngt_io_class_config.
When set, ocf_mngt_cache_io_classes_configure() moves cache lines of
that IO class to the unclassified IO class, both when the class is
updated and when it's removed. The lines get reclassified on the next
access.

Only the user knows whether a modified classification rule changes the
meaning of the IO class, so the decision is left to them per IO class.

Repartitioning is done after the whole configuration is applied, as it
can't be rolled back.

Update the pyocf mirror of the structure accordingly.

Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
@robertbaldyga
robertbaldyga merged commit 88f63c0 into Open-CAS:master Oct 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants