Skip to content

devicemapper: use atomic.Value for lock-free cache reads#3764

Merged
dims merged 1 commit intogoogle:masterfrom
dgrisonnet:devicemapper-reduce-lock-contention
Dec 4, 2025
Merged

devicemapper: use atomic.Value for lock-free cache reads#3764
dims merged 1 commit intogoogle:masterfrom
dgrisonnet:devicemapper-reduce-lock-contention

Conversation

@dgrisonnet
Copy link
Contributor

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.

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>
@thaJeztah
Copy link
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?

@dgrisonnet
Copy link
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?

@haircommander
Copy link
Contributor

Nope not to my understanding. Possibly by kata that was the last remaining user but i doubt it atm

@haircommander
Copy link
Contributor

but kata doesn't use cadvisor, so yeah I don't think we need this

@dims dims merged commit 627928e into google:master Dec 4, 2025
7 checks passed
@thaJeztah
Copy link
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 👍

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