[PATCH v2] xfs: re-enable xfsaild idle mode and fix associated races

Christoph Hellwig hch at infradead.org
Thu Jun 21 02:11:36 CDT 2012


On Thu, Jun 21, 2012 at 08:35:48AM +1000, Dave Chinner wrote:
> writes are single instructions on 64 bit systems. The lock is
> required for 32 bit systems because the write requires separate 32
> bit writes to the LSN which can result in unlocked accesses seeing
> partially updated (and hence incorrect) LSN values.
> 
> So the memory barriers are definitely needed for 64 bit machines
> because there is no locking on the update and spinlocks only provide
> memory barriers via unlock->lock transitions, not via a single
> spin_lock() call.

Indeed.  So we'll either need the barriers, or just always take xa_lock
in xfs_ail_push.  Given that xa_lock and xa_target appear in the same
cache line it probably wouldn't even make much of a difference.



More information about the xfs mailing list