Skip to content

prefetch: Assign prefetch requests to the correct IO class - #983

Merged
robertbaldyga merged 1 commit into
Open-CAS:masterfrom
rafalste:fix_prefetch_part
Oct 8, 2026
Merged

robertbaldyga merged 1 commit into
Open-CAS:masterfrom
rafalste:fix_prefetch_part

Conversation

@rafalste

@rafalste rafalste commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

All user requests pass through the ocf_core_volume_submit_io() function which assign its 'part_id' from an internal 'io.io_class' field set when creating the request.
When prefetch request is created in ocf_prefetch_range() function, only its 'io.io_class' field is set and since this request does not pass through ocf_core_volume_submit_io() the 'part_id' field is left with unchanged default which points to class 0.
Because OCF uses 'part_id' to properly route the request, prefetch requests are inserted into partition 0 instead of the proper 33 which is reserved for prefetcher.

Comment thread src/prefetch/ocf_prefetch.c Outdated
All user requests pass through the ocf_core_volume_submit_io() function
which assign its 'part_id' from an internal 'io.io_class' field set
when creating the request.
When prefetch request is created in ocf_prefetch_range() function, only
its 'io.io_class' field is set and since this request does not pass
through ocf_core_volume_submit_io() the 'part_id' field is left with
unchanged default which points to class 0.
Because OCF uses 'part_id' to properly route the request, prefetch
requests are inserted into partition 0 instead of the proper 33 which
is reserved for prefetcher.

Signed-off-by: Rafal Stefanowski <r.stefanowski@pm.me>
@robertbaldyga
robertbaldyga merged commit 09fe2b2 into Open-CAS:master Oct 8, 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.

2 participants