Skip to content

xfs: rework near mode extent allocation

Brian Foster linux-xfs 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest11 patches 10 repliesIn review
  2. v411 patches 20 repliesSuperseded
  3. v34 patches 7 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v211 patches17 repliesSuperseded
v16 patches13 repliesSuperseded

Changes in v5 from the cover letter · 34 lines

- Fix up active logic in patch 1.
- Fix busy_gen type.
- Change ->diff initialization value in proper patch.
- Deactivate cntbt cursor on location of perfect extent.
- Various aesthetic cleanups.
v4: https://lore.kernel.org/linux-xfs/[email protected]/
- Fix up cursor active tracking type usage.
- Fix up cntbt lookup function signature.
- Added high level comment on optimized allocation algorithm.
- Split up series into smaller patches to separate refactoring from functional changes.
v3: https://lore.kernel.org/linux-xfs/[email protected]/
- Drop by-size and exact allocation rework bits.
- Add near mode last block scan.
- Add debug mode patch to randomly toggle near mode algos.
- Refactor cursor setup/lookup logic.
- Refactor minlen reverse scan to be common between near mode algos.
- Fix up logic to consistently prioritize extent size over locality.
- Add more useful tracepoints.
- Miscellaneous bug fixes and code/comment cleanups.
v2: https://marc.info/?l=linux-xfs&m=155854834815400&w=2
- Lift small mode refactoring into separate patch (retained review tag(s).
- Various logic cleanups and refactors.
- Push active flag down into btree cursor private area; eliminate cursor container struct.
- Refactor final allocation code. Fold xfs_alloc_ag_vextent_type() into caller and factor out accounting.
- Fix up tracepoints.
v1: https://marc.info/?l=linux-xfs&m=155742169729590&w=2
- Continued development (various fixes, refinements) on generic bits and near mode implementation.
- Added patches 4-6 to refactor exact, by-size and small allocation modes.
rfcv2: https://marc.info/?l=linux-xfs&m=155197946630582&w=2
- Dropped spurious initial refactoring.
- Added minlen functionality.
- Properly tied into near alloc path.
- General refactoring and cleanups.
rfcv1: https://marc.info/?l=linux-xfs&m=154479089914351&w=2

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11xfs: track active state of allocation btree cursorsfs/xfs/libxfs/xfs_alloc.c fs/xfs/libxfs/xfs_alloc_btree.c fs/xfs/libxfs/xfs_btree.h+25 -35 replies
2/11xfs: introduce allocation cursor data structurefs/xfs/libxfs/xfs_alloc.c+163 -1550 replies
3/11xfs: track allocation busy state in allocation cursorfs/xfs/libxfs/xfs_alloc.c+14 -110 replies
4/11xfs: track best extent from cntbt lastblock scan in alloc cursorfs/xfs/libxfs/xfs_alloc.c+33 -301 reply
5/11xfs: refactor cntbt lastblock scan best extent logic into helperfs/xfs/libxfs/xfs_alloc.c fs/xfs/xfs_trace.h+113 -281 reply
6/11xfs: reuse best extent tracking logic for bnobt scanfs/xfs/libxfs/xfs_alloc.c fs/xfs/xfs_trace.h+79 -2011 reply
7/11xfs: refactor allocation tree fixup codefs/xfs/libxfs/xfs_alloc.c+2 -160 replies
8/11xfs: refactor and reuse best extent scanning logicfs/xfs/libxfs/xfs_alloc.c+55 -551 reply
9/11xfs: refactor near mode alloc bnobt scan into separate functionfs/xfs/libxfs/xfs_alloc.c+74 -540 replies
10/11xfs: factor out tree fixup logic into helperfs/xfs/libxfs/xfs_alloc.c fs/xfs/xfs_trace.h+33 -100 replies
11/11xfs: optimize near mode bnobt scans with concurrent cntbt lookupsfs/xfs/libxfs/xfs_alloc.c fs/xfs/xfs_trace.h+144 -121 reply

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchDarrick J. Wong
1/11R-b
2/11R-b
3/11R-b
4/11R-b
5/11R-b
6/11R-b
7/11R-b
8/11R-b
9/11R-b
10/11R-b
11/11R-b

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

Read the v5 thread

Cover letter [PATCH v5 00/11] xfs: rework near mode extent allocation

Hi all,

Here's v5 of the near mode block allocation rework. This mostly consists of various minor cleanups from v4. The only functional change is to deactivate the cntbt cursor on finding a perfect extent in patch 8. Thoughts, reviews, flames appreciated.

Brian

v5:
- Fix up active logic in patch 1.
- Fix busy_gen type.
- Change ->diff initialization value in proper patch.
- Deactivate cntbt cursor on location of perfect extent.
- Various aesthetic cleanups.
v4: https://lore.kernel.org/linux-xfs/[email protected]/
- Fix up cursor active tracking type usage.
- Fix up cntbt lookup function signature.
- Added high level comment on optimized allocation algorithm.
- Split up series into smaller patches to separate refactoring from functional changes.
v3: https://lore.kernel.org/linux-xfs/[email protected]/
- Drop by-size and exact allocation rework bits.
- Add near mode last block scan.
- Add debug mode patch to randomly toggle near mode algos.
- Refactor cursor setup/lookup logic.
- Refactor minlen reverse scan to be common between near mode algos.
- Fix up logic to consistently prioritize extent size over locality.
- Add more useful tracepoints.
- Miscellaneous bug fixes and code/comment cleanups.
v2: https://marc.info/?l=linux-xfs&m=155854834815400&w=2
- Lift small mode refactoring into separate patch (retained review tag(s).
- Various logic cleanups and refactors.
- Push active flag down into btree cursor private area; eliminate cursor container struct.
- Refactor final allocation code. Fold xfs_alloc_ag_vextent_type() into caller and factor out accounting.
- Fix up tracepoints.
v1: https://marc.info/?l=linux-xfs&m=155742169729590&w=2
- Continued development (various fixes, refinements) on generic bits and near mode implementation.
- Added patches 4-6 to refactor exact, by-size and small allocation modes.
rfcv2: https://marc.info/?l=linux-xfs&m=155197946630582&w=2
- Dropped spurious initial refactoring.
- Added minlen functionality.
- Properly tied into near alloc path.
- General refactoring and cleanups.
rfcv1: https://marc.info/?l=linux-xfs&m=154479089914351&w=2

Brian Foster (11):
xfs: track active state of allocation btree cursors
xfs: introduce allocation cursor data structure
xfs: track allocation busy state in allocation cursor
xfs: track best extent from cntbt lastblock scan in alloc cursor
xfs: refactor cntbt lastblock scan best extent logic into helper
xfs: reuse best extent tracking logic for bnobt scan
xfs: refactor allocation tree fixup code
xfs: refactor and reuse best extent scanning logic
xfs: refactor near mode alloc bnobt scan into separate function
xfs: factor out tree fixup logic into helper
xfs: optimize near mode bnobt scans with concurrent cntbt lookups

 fs/xfs/libxfs/xfs_alloc.c       | 897 ++++++++++++++++++--------------
 fs/xfs/libxfs/xfs_alloc_btree.c |   1 +
 fs/xfs/libxfs/xfs_btree.h       |   3 +
 fs/xfs/xfs_trace.h              |  33 +-
 4 files changed, 547 insertions(+), 387 deletions(-)
Signature · 1 line
2.20.1