summaryrefslogtreecommitdiff
path: root/sys/dev/dm/dm_pdev.c
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2019-12-01 13:39:53 +0000
committerad <ad@NetBSD.org>2019-12-01 13:39:53 +0000
commitc1b3baf0ab0dfe7797227d7a0967e6a0b43d9cdb (patch)
treeab1c8fd33622e833d01e2d9488972f600e018f07 /sys/dev/dm/dm_pdev.c
parent3916b1c565cd1b8f7fabc3bcf0ea29a2a59949a4 (diff)
namecache changes:
- Delete the per-entry lock, and borrow the associated vnode's v_interlock instead. We need to acquire it during lookup anyway. We can revisit this in the future but for now it's a stepping stone, and works within the quite limited context of what we have (BSD namecache/lookup design). - Implement an idea that Mateusz Guzik (mjg@FreeBSD.org) gave me. In cache_reclaim(), we don't need to lock out all of the CPUs to garbage collect entries. All we need to do is observe their locks unheld at least once: then we know they are not in the critical section, and no longer have visibility of the entries about to be garbage collected. - The above makes it safe for sysctl to take only namecache_lock to get stats, and we can remove all the crap dealing with per-CPU locks. - For lockstat, make namecache_lock a static now we have __cacheline_aligned. - Avoid false sharing - don't write back to nc_hittime unless it has changed. Put a a comment in place explaining this. Pretty sure this was there in 2008/2009 but someone removed it (understandably, the code looks weird). - Use a mutex to protect the garbage collection queue instead of atomics, and adjust the low water mark up so that cache_reclaim() isn't doing so much work at once.
Diffstat (limited to 'sys/dev/dm/dm_pdev.c')
0 files changed, 0 insertions, 0 deletions