Re: [PATCH 08/12] xfs: convert l_tail_lsn to an atomic variable.

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

 



On Mon, Dec 13, 2010 at 03:44:39PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> log->l_tail_lsn is currently protected by the log grant lock. The
> lock is only needed for serialising readers against writers, so we
> don't really need the lock if we make the l_tail_lsn variable an
> atomic. Converting the l_tail_lsn variable to an atomic64_t means we
> can start to peel back the grant lock from various operations.
> 
> Also, provide functions to safely crack an atomic LSN variable into
> it's component pieces and to recombined the components into an
> atomic variable. Use them where appropriate.
> 
> This also removes the need for explicitly holding a spinlock to read
> the l_tail_lsn on 32 bit platforms.

I know I suggested this, but I think the atomic read of l_tail_lsn
in xlog_space_left might be problemetic for the call from
xlog_grant_push_ail, where we read it twice now.  Maybe split
xlog_space_left into a __xlog_space_left that gets the already cracked
values, and xlog_space_left as a wrapper around it?

_______________________________________________
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