From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 5/7] XFS: Make use of the init-once slab optimisation.
Date: Mon, 18 Aug 2008 10:19:12 +1000 [thread overview]
Message-ID: <20080818001912.GE19760@disturbed> (raw)
In-Reply-To: <20080814190001.GA19070@infradead.org>
On Thu, Aug 14, 2008 at 03:00:01PM -0400, Christoph Hellwig wrote:
> On Thu, Aug 14, 2008 at 05:14:41PM +1000, Dave Chinner wrote:
> > To avoid having to initialise some fields of the XFS inode
> > on every allocation, we can use the slab init-once feature
> > to initialise them. All we have to guarantee is that when
> > we free the inode, all it's entries are in the initial state.
> > Add asserts where possible to ensure debug kernels check this
> > initial state before freeing and after allocation.
>
> Looks good, and I think it this can be moved before the series and
> submitted ASAP.
I'll reorder it....
> > diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c
> > index cf6754a..4f4c939 100644
> > --- a/fs/xfs/xfs_itable.c
> > +++ b/fs/xfs/xfs_itable.c
> > @@ -594,21 +594,21 @@ xfs_bulkstat(
> > /*
> > * Get the inode cluster buffer
> > */
> > - ASSERT(xfs_inode_zone != NULL);
> > - ip = kmem_zone_zalloc(xfs_inode_zone,
> > - KM_SLEEP);
> > - ip->i_ino = ino;
> > - ip->i_mount = mp;
> > - spin_lock_init(&ip->i_flags_lock);
> > if (bp)
> > xfs_buf_relse(bp);
> > + ip = xfs_inode_alloc(mp, ino);
> > + if (!ip) {
> > + bp = NULL;
> > + rval = ENOMEM;
> > + break;
> > + }
> > error = xfs_itobp(mp, NULL, ip,
> > &dip, &bp, bno,
> > XFS_IMAP_BULKSTAT,
> > XFS_BUF_LOCK);
>
> Yikes, what a mess - eventually we should convert this to opencoded cals
> to xfs_imap and xfs_imap_to_bp, but before the function needs to be
> split into manageable chunk. Another item on the todo list..
Yeah, bulkstat is an utter, utter mess. There's a lot of work needed
to clean it up...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next parent reply other threads:[~2008-08-18 0:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1218698083-11226-1-git-send-email-david@fromorbit.com>
[not found] ` <1218698083-11226-6-git-send-email-david@fromorbit.com>
[not found] ` <20080814190001.GA19070@infradead.org>
2008-08-18 0:19 ` Dave Chinner [this message]
[not found] ` <1218698083-11226-5-git-send-email-david@fromorbit.com>
[not found] ` <20080814194702.GB12237@infradead.org>
2008-08-18 0:19 ` [PATCH 4/7] XFS: Never call mark_inode_dirty_sync() directly Dave Chinner
[not found] ` <1218698083-11226-7-git-send-email-david@fromorbit.com>
[not found] ` <20080814200006.GC12237@infradead.org>
2008-08-18 0:34 ` [PATCH 6/7] XFS: Combine the XFS and Linux inodes Dave Chinner
[not found] ` <1218698083-11226-8-git-send-email-david@fromorbit.com>
[not found] ` <20080814201022.GA20557@infradead.org>
2008-08-18 0:42 ` [PATCH 7/7] XFS: don't use vnodes where unnecessary Dave Chinner
[not found] ` <20080814194550.GA12237@infradead.org>
2008-08-18 1:13 ` [PATCH 0/7] RFC: combine linux and XFS inodes Dave Chinner
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=20080818001912.GE19760@disturbed \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.