devicemapper: use atomic.Value for lock-free cache reads#3764
Merged
dims merged 1 commit intogoogle:masterfrom Dec 4, 2025
Merged
devicemapper: use atomic.Value for lock-free cache reads#3764dims merged 1 commit intogoogle:masterfrom
dims merged 1 commit intogoogle:masterfrom
Conversation
The ThinPoolWatcher cache is read frequently by container housekeeping goroutines (via GetUsage) while being updated every 15 seconds by Refresh(). Using atomic.Value allows lock-free reads, eliminating potential contention between the many readers and the single writer. Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
Contributor
|
I'm not too familiar with the code in this repository, but I noticed the devicemapper code, and wondered if it was actually still used; I know docker / moby dropped support for the devicemapper graph driver; is it still supported (and used) by PodMan? |
Contributor
Author
|
That's a good point, I am not familiar enough with the ecosystem to know. @haircommander do you perhaps know if devicemapper driver is still supported? |
Contributor
|
Nope not to my understanding. Possibly by kata that was the last remaining user but i doubt it atm |
Contributor
|
but kata doesn't use cadvisor, so yeah I don't think we need this |
Contributor
|
Thanks! Yeah, so looks like we should be able to start cleaning up some bits. Not the highest priority, but could be a good follow up 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ThinPoolWatcher cache is read frequently by container housekeeping goroutines (via GetUsage) while being updated every 15 seconds by Refresh(). Using atomic.Value allows lock-free reads, eliminating potential contention between the many readers and the single writer.