Skip to content

RFC xfs: grant head concurrency experiment

Brian Foster linux-xfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xfs: temporarily bypass oneshot grant tail verificationfs/xfs/xfs_log.c+6 -40 replies
2/3xfs: fold grant space update into head check functionfs/xfs/xfs_log.c+3 -20 replies
3/3xfs: recheck free reservation on grant head update contentionfs/xfs/xfs_log.c fs/xfs/xfs_trace.h+36 -120 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchBrian Foster
1/3Not-signed-off-by
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/3] xfs: grant head concurrency experiment

Hi all,

This series (which is RFC for obvious reasons) fell out of recent discussion on Dave's CIL throttling work[1] over the raciness of the lockless log reservation algorithm. I was originally exploring some improved debug mode checks when I eventually determined that would be pointless due to the fact that with small enough logs, grant tail overrun conditions become prevalent.

This is currently suppressed by the XLOG_TAIL_WARN flag, which is removed in patch 1 simply for experimentation and demonstration purposes. These warnings would likely be mitigated some by threshold tracking improvements to the warning itself, but the warnings were continuous enough that didn't seem a useful approach. Patch 2 does some minor refactoring and patch 3 ties grant space update failures into the grant head check mechanism.

This has only seen limited testing to confirm that tail overruns are significantly reduced on smaller logs (without noticeable performance penalty) and that the newly added retry events are nonexistent on filesystems with normal/default sized logs. The caveat is potential change in ordering of transactions in some cases, but it's not clear that's a problem given the loose enough nature of the current algorithm with respect to the (limited) scope of transactions impacted by this type of change. We could also look into whether something like adding retried checks to the head of the list vs the tail would preserve group ordering, etc. Anyways, thoughts on something like this?

Brian

[1] https://lore.kernel.org/linux-xfs/[email protected]/

Brian Foster (3):
xfs: temporarily bypass oneshot grant tail verification
xfs: fold grant space update into head check function
xfs: recheck free reservation on grant head update contention

 fs/xfs/xfs_log.c   | 58 +++++++++++++++++++++++++++++++++-------------
 fs/xfs/xfs_trace.h |  1 +
 2 files changed, 43 insertions(+), 16 deletions(-)
Signature · 1 line
2.20.1