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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux