Skip to content

Don't cache unused glocks

Andreas Gruenbacher gfs2 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4gfs2: Enable automatic glock hash table shrinkingfs/gfs2/glock.c+1 -00 replies
2/4gfs2: Don't cache unreferenced glocksfs/gfs2/glock.c+13 -80 replies
3/4gfs2: Skip dlm unlocks earlierfs/gfs2/glock.c fs/gfs2/incore.h fs/gfs2/lock_dlm.c +2 more+2 -70 replies
4/4gfs2: Remove the glock lru list and shrinkerfs/gfs2/glock.c fs/gfs2/glock.h fs/gfs2/incore.h +4 more+15 -2010 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Don't cache unused glocks

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(-)
Signature · 1 line
2.55.0