diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-23 12:21:37 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-10-22 16:40:56 -0700 |
commit | 5bcdc3aee82d076c811f0fc5e9a0773f2ea73af4 (patch) | |
tree | 17d52f22a210409d649a87de62d39be9335a1230 /fs/xfs/libxfs/xfs_btree.h | |
parent | cf94cb4944fb956a8d48ef228cb76b8c37182580 (diff) |
xfs: use separate btree cursor slab for each btree typebtree-cursor-zones_2021-10-22
Now that we have the infrastructure to track the max possible height of
each btree type, we can create a separate slab zone for cursors of each
type of btree. For smaller indices like the free space btrees, this
means that we can pack more cursors into a slab page, improving slab
utilization.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h index f84d36b4b6c2..276da72e8597 100644 --- a/fs/xfs/libxfs/xfs_btree.h +++ b/fs/xfs/libxfs/xfs_btree.h @@ -13,8 +13,6 @@ struct xfs_trans; struct xfs_ifork; struct xfs_perag; -extern kmem_zone_t *xfs_btree_cur_zone; - /* * Generic key, ptr and record wrapper structures. * @@ -92,12 +90,6 @@ uint32_t xfs_btree_magic(int crc, xfs_btnum_t btnum); #define XFS_BTREE_STATS_ADD(cur, stat, val) \ XFS_STATS_ADD_OFF((cur)->bc_mp, (cur)->bc_statoff + __XBTS_ ## stat, val) -/* - * The btree cursor zone hands out cursors that can handle up to this many - * levels. This is the known maximum for all btree types. - */ -#define XFS_BTREE_CUR_ZONE_MAXLEVELS (9) - struct xfs_btree_ops { /* size of the key and record structures */ size_t key_len; @@ -599,5 +591,6 @@ int __init xfs_btree_create_cursor_cache(xfs_btnum_t btnum, const char *name, unsigned int maxlevels); int __init xfs_btree_alias_cursor_cache(xfs_btnum_t btnum, xfs_btnum_t src); unsigned int xfs_btree_absolute_maxlevels(xfs_btnum_t btnum); +void xfs_btree_destroy_cursor_caches(void); #endif /* __XFS_BTREE_H__ */ |