Skip to content

Limit read lock holders - #968

Merged
robertbaldyga merged 2 commits into
Open-CAS:masterfrom
robertbaldyga:limit-read-lock-holders
Aug 5, 2026
Merged

Limit read lock holders#968
robertbaldyga merged 2 commits into
Open-CAS:masterfrom
robertbaldyga:limit-read-lock-holders

Conversation

@robertbaldyga

@robertbaldyga robertbaldyga commented Aug 4, 2026

Copy link
Copy Markdown
Member

The access counter is 8 bit wide and its top value is reserved for the
write lock, so no more than OCF_CACHE_LINE_ACCESS_MAX_RD readers can hold
the entry at the same time. Incrementing the counter beyond that limit
would make the entry indistinguishable from a write locked one, so the
excess readers have to be put on the waiters list instead.

Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
Signed-off-by: Robert Baldyga <robert.baldyga@unvertical.com>
@robertbaldyga
robertbaldyga merged commit 64660e6 into Open-CAS:master Aug 5, 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.

1 participant