linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, chandan.babu@oracle.com,
	chandanrlinux@gmail.com, david@fromorbit.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCHSET RFC v2 chandan 0/4] xfs: separate btree cursor slab zones
Date: Thu, 23 Sep 2021 18:27:37 -0700	[thread overview]
Message-ID: <163244685787.2701674.13029851795897591378.stgit@magnolia> (raw)

Hi all,

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 zone:

$ grep xfs.*cur /proc/slabinfo
xfs_refc_btree_cur      0      0    192   21    1 : tunables    0    0    0 : slabdata      0      0      0
xfs_ialloc_btree_cur      0      0    208   19    1 : tunables    0    0    0 : slabdata      0      0      0
xfs_bmap_btree_cur      0      0    240   17    1 : tunables    0    0    0 : slabdata      0      0      0
xfs_rmap_btree_cur      0      0    240   17    1 : tunables    0    0    0 : slabdata      0      0      0
xfs_alloc_btree_cur      0      0    208   19    1 : tunables    0    0    0 : slabdata      0      0      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, we still come out
ahead in terms of cursor size for three of the five btree types.

This series also includes a couple of patches to reduce holes and
unnecessary fields in the btree cursor.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=btree-cursor-zones-5.16
---
 fs/xfs/libxfs/xfs_alloc_btree.c    |   12 +++++++
 fs/xfs/libxfs/xfs_alloc_btree.h    |    1 +
 fs/xfs/libxfs/xfs_bmap_btree.c     |   13 ++++++++
 fs/xfs/libxfs/xfs_bmap_btree.h     |    1 +
 fs/xfs/libxfs/xfs_btree.c          |   61 +++++++++++++++++++++++++++++++----
 fs/xfs/libxfs/xfs_btree.h          |   28 +++++++++-------
 fs/xfs/libxfs/xfs_fs.h             |    3 ++
 fs/xfs/libxfs/xfs_ialloc_btree.c   |   11 ++++++
 fs/xfs/libxfs/xfs_ialloc_btree.h   |    1 +
 fs/xfs/libxfs/xfs_refcount_btree.c |   13 ++++++++
 fs/xfs/libxfs/xfs_refcount_btree.h |    1 +
 fs/xfs/libxfs/xfs_rmap_btree.c     |   25 +++++++++++++++
 fs/xfs/libxfs/xfs_rmap_btree.h     |    1 +
 fs/xfs/libxfs/xfs_types.h          |    3 ++
 fs/xfs/xfs_super.c                 |   62 +++++++++++++++++++++++++++++++++---
 15 files changed, 210 insertions(+), 26 deletions(-)


             reply	other threads:[~2021-09-24  1:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24  1:27 Darrick J. Wong [this message]
2021-09-24  1:27 ` [PATCH 1/4] xfs: remove xfs_btree_cur.bc_blocklog Darrick J. Wong
2021-09-24  1:27 ` [PATCH 2/4] xfs: reduce the size of nr_ops for refcount btree cursors Darrick J. Wong
2021-09-24  1:27 ` [PATCH 3/4] xfs: check absolute maximum nlevels for each btree type Darrick J. Wong
2021-09-26  0:43   ` Dave Chinner
2021-09-27 18:17     ` Darrick J. Wong
2021-09-27 20:29       ` Darrick J. Wong
2021-09-27 21:57       ` Dave Chinner
2021-09-24  1:27 ` [PATCH 4/4] xfs: use separate btree cursor slab " Darrick J. Wong
2021-09-26  0:47   ` Dave Chinner
2021-09-27 18:21     ` Darrick J. Wong
2021-09-27 22:01       ` Dave Chinner
2021-10-12 18:49         ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=163244685787.2701674.13029851795897591378.stgit@magnolia \
    --to=djwong@kernel.org \
    --cc=chandan.babu@oracle.com \
    --cc=chandanrlinux@gmail.com \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).