Prevent AIL lock contention during transaction completion
When hundreds of processors attempt to commit transactions at the
same time, they can contend on the AIL lock when updating the tail
LSN held in the in-core log structure.
At the moment, the tail LSN is only needed when actually writing
out an iclog, so it really does not need to be updated on every
single transaction completion - only those that result in switching
iclogs and flushing them to disk.
The result is that we reduce the number of times we need to grab the
AIL lock and the log grant lock by up to two orders of magnitude
on large processor count machines. The problem has previously been
hidden by AIL lock contention walking the AIL list which was
recently solved and uncovered this issue.
Date: Fri Feb 15 18:49:54 AEDT 2008
Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
Inspected by: tes@xxxxxxx
The following file(s) were checked into:
longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb
Modid: xfs-linux-melb:xfs-kern:30504a
fs/xfs/xfs_log.c - 1.347 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log.c.diff?r1=text&tr1=1.347&r2=text&tr2=1.346&f=h
- Only update the tail lsn when we need to write it to disk
rather than every time we release an iclog to reduce lock
contention on the AIL lock.
|