xfs
[Top] [All Lists]

Re: [PATCH 2/2] xfs: reduce the number of log forces from tail pushing

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/2] xfs: reduce the number of log forces from tail pushing
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sun, 14 Aug 2011 12:31:44 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1312786271-10871-3-git-send-email-david@xxxxxxxxxxxxx>
References: <1312786271-10871-1-git-send-email-david@xxxxxxxxxxxxx> <1312786271-10871-3-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
The flush_log variable in xfs_ail_worker is non-zero after your
patch, and can be removed.

The second argument for xfs_log_force to force a sync log force is
XFS_LOG_SYNC, not SYNC_WAIT.

I also don't really like the goto again style - we can just move the log
push at the beggining of the function, the only thing it requires is
adding an additional list_empty check, e.g.:

        spin_lock(&ailp->xa_lock);
        /*
         * If last time we ran we encountered pinned items, force the log
         * first, wait for it and then push again.
         */
        if (ailp->xa_last_pushed_lsn == 0 && ailp->xa_log_flush &&
            !list_empty(&ailp->xa_ail)) {
                ailp->xa_log_flush = 0;
                spin_unlock(&ailp->xa_lock);
                XFS_STATS_INC(xs_push_ail_flush);
                xfs_log_force(mp, SYNC_WAIT);
                spin_lock(&ailp->xa_lock);
        }

        target = ailp->xa_target;
        lip = xfs_trans_ail_cursor_first(ailp, &cur, ailp->xa_last_pushed_lsn);

<Prev in Thread] Current Thread [Next in Thread>