[PATCH 0/4] Don't cache unused glocks
Andreas Gruenbacher <[email protected]> Tue, 28 Jul 2026 18:41:20 +0200
| Newsgroups | dev.linux.lists.gfs2 |
|---|---|
| Message-ID | <[email protected]> |
This patch series changes gfs2 to drop glocks as soon as possible after their corresponding inodes are evicted (by being deleted or being forced out due to memory pressure). This causes the corresponding DLM locks to be unlocked much sooner, which smooths out DLM unlocking load spikes at unmount time. Before this patch set, the glocks were only forced out in response to memory pressure, as well as at filesystem unmount time. Unlocking the corresponding DLM locks is somewhat slow though, so depending on the workload, a lot of memory could get tied up unnecessarily. In addition, some workloads could cause filesystem unmount time to skyrocket. By not caching unused glocks, we can also get rid of the glocks LRU list. Andreas Gruenbacher (4): gfs2: Enable automatic glock hash table shrinking gfs2: Don't cache unreferenced glocks gfs2: Skip dlm unlocks earlier gfs2: Remove the glock lru list and shrinker fs/gfs2/glock.c | 225 ++++--------------------------------------- fs/gfs2/glock.h | 2 +- fs/gfs2/incore.h | 7 +- fs/gfs2/lock_dlm.c | 2 +- fs/gfs2/main.c | 1 - fs/gfs2/ops_fstype.c | 5 +- fs/gfs2/super.c | 2 +- fs/gfs2/sys.c | 2 - fs/gfs2/trace_gfs2.h | 1 - 9 files changed, 31 insertions(+), 216 deletions(-) -- 2.55.0