linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org
Cc: linux-xfs@vger.kernel.org, hch@infradead.org
Subject: [PATCHSET 0/3] xfs: reduce indirect function calls in inode walk
Date: Thu, 18 Mar 2021 15:33:39 -0700	[thread overview]
Message-ID: <161610681966.1887634.12780057277967410395.stgit@magnolia> (raw)

Hi all,

This short series reduces the number of indirect function calls when we
want to iterate the incore inode radix tree, and reduces the number of
arguments that must be passed to the walk function.

I made a few observations about incore inode radix tree walks -- the one
caller (blockgc) that cares about radix tree tags is internal to
xfs_icache.c, and there's a 1:1 mapping between that tag and the
iterator function.  Furthermore, the only other caller (quotaoff) is the
only caller to supply a nonzero flags argument, and it never specifies a
radix tree tag.

On those grounds, we can remove both the flags and tag arguments to
xfs_inode_walk; and for the internal caller, we can replace the indirect
call with direct calls to the blockgc functions.  This makes for less
ugly code and gives us a (negligible) performance bump.

This series is a prerequisite for the next patchset, since deferred
inode inactivation will add another inode radix tree tag and iterator
function to go with it.

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=iwalk-remove-indirect-calls-5.13
---
 fs/xfs/xfs_icache.c      |   57 ++++++++++++++++++++++++++++++----------------
 fs/xfs/xfs_icache.h      |    9 ++-----
 fs/xfs/xfs_qm_syscalls.c |    3 +-
 3 files changed, 40 insertions(+), 29 deletions(-)


             reply	other threads:[~2021-03-18 22:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 22:33 Darrick J. Wong [this message]
2021-03-18 22:33 ` [PATCH 1/3] xfs: remove tag parameter from xfs_inode_walk{,_ag} Darrick J. Wong
2021-03-19  6:25   ` Christoph Hellwig
2021-03-19  7:35     ` Christoph Hellwig
2021-03-19 16:43     ` Darrick J. Wong
2021-03-19 16:48       ` Christoph Hellwig
2021-03-23 18:35       ` Christoph Hellwig
2021-03-18 22:33 ` [PATCH 2/3] xfs: reduce indirect calls in xfs_inode_walk{,_ag} Darrick J. Wong
2021-03-18 22:33 ` [PATCH 3/3] xfs: remove iter_flags parameter from xfs_inode_walk_* 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=161610681966.1887634.12780057277967410395.stgit@magnolia \
    --to=djwong@kernel.org \
    --cc=hch@infradead.org \
    --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).