RFC xfs: track and skip realloc of busy inodes
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | xfs: require an rcu grace period before inode recyclefs/ fs/ fs/ | +40 | 0 replies | |
| 2/4 | xfs: tag reclaimable inodes with pending RCU grace periods as busyfs/ | +13 | 2 replies | |
| 3/4 | xfs: crude chunk allocation retry mechanismfs/ | +17 | 8 replies | |
| 4/4 | xfs: skip busy inodes on finobt inode allocationfs/ | +76 | 0 replies |
Reviews trailers per patch
None of the 4 patches has a Reviewed-by or Acked-by.
| Patch | Brian Foster |
|---|---|
| 1/4 | |
| 2/4 | |
| 3/4 | Not-Signed-off-by |
| 4/4 | Not-Signed-off-by |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH RFC 0/4] xfs: track and skip realloc of busy inodes
Hi all,
This RFC cleans up some of the previous experimentation I was doing and turns it into more of a usable prototype. The first couple of patches are pretty straightforward. Patch 1 is a variant of the previously posted patch to stamp inodes with a grace period at destroy time. Patch 2 tags inodes with still pending grace periods as busy in the radix tree. Patch 3 is a quick hack to allow the inode selection algorithms to fall back to chunk allocation and retry. Patch 4 updates the finobt selection algorithms to filter records with busy inodes and fall back to chunk allocation until a usable record is found.
The current status of this work is that it should be functionally effective in terms of preventing allocation of busy inodes. This can be measured by lack of RCU stalls, also identified by the tracepoint added in patch 1 (this should probably assert or warn in the new inode allocation recycle case since the goal is for that to never happen). Performance is significantly improved from previous tests with only patch 1, but still reduced from mainline. However, reduced performance is to be expected because mainline unsafely reuses inodes rather aggressively. Therefore, the goal is for something that preserves/maintains closer to pure inode allocation performance.
I expect that the allocation algorithm can be adapted further to provide incremental improvements in performance. The first and most obvious step is to defer freeing of inode chunks to the background to mitigate repetitive finobt search failure -> new chunk allocation retry sequences that may be seen with the current prototype. Other improvements may be possible to make the search algorithm itself more effective. I'm sending this as a prototype for early feedback and thoughts on approach, prospective improvements, etc. Thoughts, reviews, flames appreciated.
Brian
Brian Foster (4):
xfs: require an rcu grace period before inode recycle
xfs: tag reclaimable inodes with pending RCU grace periods as busy
xfs: crude chunk allocation retry mechanism
xfs: skip busy inodes on finobt inode allocation
fs/xfs/libxfs/xfs_ialloc.c | 99 +++++++++++++++++++++++++++++++++++--- fs/xfs/xfs_icache.c | 55 +++++++++++++++++---- fs/xfs/xfs_inode.h | 3 +- fs/xfs/xfs_trace.h | 8 ++- 4 files changed, 146 insertions(+), 19 deletions(-)
Signature · 1 line
2.31.1