summaryrefslogtreecommitdiff
tag namebtree-dynamic-depth-5.16_2021-10-14 (e920beb5ac09bafe33e6efb138f833a272ffc615)
tag date2021-10-14 13:14:35 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 078e7a3a27...
xfs: support dynamic btree cursor height
In what's left of this series, we rearrange the incore btree cursor so that we can support btrees of any height. This will become necessary for realtime rmap and reflink since we'd like to handle tall trees without bloating the AG btree cursors. Chandan Babu pointed out that his large extent counters series depends on the ability to have btree cursors of arbitrary heights, so I've ported this to 5.15-rc4 so his patchsets won't have to depend on djwong-dev for submission. Following the review discussions about the dynamic btree cursor height patches, I've throw together another series to reduce the size of the btree cursor, compute the absolute maximum possible btree heights for each btree type, and now each btree cursor has its own slab cache: $ grep xfs.*cur /proc/slabinfo xfs_refcbt_cur 0 0 200 20 1 : tunables 0 0 0 : slabdata 4 4 0 xfs_rmapbt_cur 0 0 248 16 1 : tunables 0 0 0 : slabdata 4 4 0 xfs_bmbt_cur 0 0 248 16 1 : tunables 0 0 0 : slabdata 4 4 0 xfs_inobt_cur 0 0 216 18 1 : tunables 0 0 0 : slabdata 4 4 0 xfs_bnobt_cur 0 0 216 18 1 : tunables 0 0 0 : slabdata 4 4 0 I've also rigged up the debugger to make it easier to extract the actual height information: $ xfs_db /dev/sda -c 'btheight -w absmax all' bnobt: 7 cntbt: 7 inobt: 7 finobt: 7 bmapbt: 9 refcountbt: 6 rmapbt: 9 As you can see from the slabinfo output, this no longer means that we're allocating 224-byte cursors for all five btree types. Even with the extra overhead of supporting dynamic cursor sizes and per-btree caches, we still come out ahead in terms of cursor size for three of the five btree types. This series now also includes a couple of patches to reduce holes and unnecessary fields in the btree cursor. Patches 1, 5, 11, 12, 13, 16, and 17 still need review. v2: reduce scrub btree checker memory footprint even more, put the one fixpatch first, use struct_size, fix 80col problems, move all the btree cache work to a separate series v3: rebase to 5.15-rc4, fold in the per-btree cursor cache patches, remove all the references to "zones" since they're called "caches" in Linux v4: improve documentation, clean up some geometry functions, simplify the max possible height computation code -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmFoj6sACgkQ+H93GTRK tOtkjg//ULsQwkslBXdf/eEEd5i+/bAUp5EFSMZpyc43XbQnzhD4FaHuv9whuai1 u0whbor/eam2FJdQkTtjCW//OO2F1n5IkOdY/euETQU1f0CrJUP8n30yW6W5z8wE /FtbYeLjfHDLN51v3dXU4VsdedFJ0s3TaolQq7VQlRHerdx2XbmbSkHVFkzR1TAR 3mTEvfPN4RU0OkDTp5OmtTH0bJySOa5H3lV7OUA0pxBE34TX6au3pxTnjj6E/3Qu xyG+ojgWpw4hMuOi50Q3OaAxoOwDMrcTCC8Fg7GSIO/fj5Qu/e0fkdqYNWbHvIRM YHxCD6zM/mrg79LrumhwOQgoc9+6UTMKMWOE8LWST91tU8htsGCJgkVxXhgLbEIO MetxaI47FiGH1DIB094hEeKFZzQu2nBRtnqg05RKAEvEuq8lFEsYUhG90uqaFTou sQ1wooLdjCQ6WuOI98D7RXN7S2miaC+BmoKuMLH9nJ0Q3j0S9cfy3ZaLtRz51z0g 5kR0pLfey4D1dzGhtsT0nZ/Ay7UqW+lqWDO7qnF7DTSaqsZxFqsx6hoIfr1jJPL3 ede9HZ17oiAQCv9dNhu1JfJ4TpFUvgZjNrJ4zJSIqShF6TWDSQ16KS1v4xh01eB9 OGnFPSeDM6ziswWpyosCJLEGR3Z3+IlZTtTARgbl/4D5mbA/GBg= =8kAj -----END PGP SIGNATURE-----