From: David Chinner <dgc@sgi.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] optimize XFS_IS_REALTIME_INODE w/o realtime config
Date: Sat, 25 Aug 2007 00:08:23 +1000 [thread overview]
Message-ID: <20070824140822.GP72985246@sgi.com> (raw)
In-Reply-To: <46C7627A.60503@sandeen.net>
On Sat, Aug 18, 2007 at 04:19:54PM -0500, Eric Sandeen wrote:
> Use XFS_IS_REALTIME_INODE in more places, and #define it to
> 0 if CONFIG_XFS_RT is off. This should be safe because mount
> checks in xfs_rtmount_init:
>
> # define xfs_rtmount_init(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS))
>
> so if we get mounted w/o CONFIG_XFS_RT, no realtime inodes should
> be encountered after that.
>
> Defining XFS_IS_REALTIME_INODE to 0 saves a bit of stack space,
> presumeably gcc can optimize around the various "if (0)" type
> checks:
>
> xfs_alloc_file_space -8
> xfs_bmap_adjacent -16
> xfs_bmapi -8
> xfs_bmap_rtalloc -16
> xfs_bunmapi -28
> xfs_free_file_space -64
> xfs_imap +8 <-- ? hmm.
> xfs_iomap_write_direct -12
> xfs_qm_dqusage_adjust -4
> xfs_qm_vop_chown_reserve -4
>
> Compile tested only at this point.
This misses a bunch of tests (at least in the current tot)
in xfs_bmap.c, xfs_bmap_btree.c, xfs_iget.c, dmapi/xfs_dm.c and
linux-2.6/xfs_lrw.c. I think they are all in assert statements,
but shoul dbe cleaned up as well.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next prev parent reply other threads:[~2007-08-24 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-18 21:19 [PATCH] optimize XFS_IS_REALTIME_INODE w/o realtime config Eric Sandeen
2007-08-19 19:08 ` Christoph Hellwig
2007-08-19 19:10 ` Eric Sandeen
2007-08-24 14:08 ` David Chinner [this message]
2007-08-24 17:53 ` [PATCH V2] " Eric Sandeen
2007-10-26 0:57 ` [PATCH V3] " Eric Sandeen
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=20070824140822.GP72985246@sgi.com \
--to=dgc@sgi.com \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/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