All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: David Chinner <dgc@sgi.com>
Cc: xfs@oss.sgi.com, xfs-dev@sgi.com
Subject: Re: [PATCH] fix inode allocation latency
Date: Tue, 30 Oct 2007 12:41:55 +0000	[thread overview]
Message-ID: <20071030124155.GA31166@infradead.org> (raw)
In-Reply-To: <20071029233742.GS995458@sgi.com>

On Tue, Oct 30, 2007 at 10:37:42AM +1100, David Chinner wrote:
> The log force added in xfs_iget_core() has been a performance
> issue since it was introduced for tight loops that allocate
> then unlink a single file. under heavy writeback, this can
> introduce unnecessary latency due tothe log I/o getting
> stuck behind bulk data writes.
> 
> Fix this latency problem by avoinding the need for the log
> force by moving the place we mark linux inode dirty to the
> transaction commit rather than on transaction completion.
> 
> This also closes a potential hole in the sync code where a
> linux inode is not dirty betwen the time it is modified and
> the time the log buffer has been written to disk.

The concept sounds fine to me, and the implementation looks good
aswell.

>  /*
> + * If the linux inode exists, mark it dirty.
> + * Used when commiting a dirty inode into a transaction so that
> + * the inode will get written back by the linux code
> + */
> +void
> +xfs_mark_inode_dirty_sync(
> +	xfs_inode_t	*ip)
> +{
> +	bhv_vnode_t	*vp;
> +
> +	vp = XFS_ITOV_NULL(ip);
> +	if (vp)
> +		mark_inode_dirty_sync(vn_to_inode(vp));
> +}

I think this should be:

void
xfs_mark_inode_dirty_sync(
	xfs_inode_t	*ip)
{
	if (ip->i_vnode)
		mark_inode_dirty_sync(ip->i_vnode);
}

      reply	other threads:[~2007-10-30 12:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 23:37 [PATCH] fix inode allocation latency David Chinner
2007-10-30 12:41 ` Christoph Hellwig [this message]

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=20071030124155.GA31166@infradead.org \
    --to=hch@infradead.org \
    --cc=dgc@sgi.com \
    --cc=xfs-dev@sgi.com \
    --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.