aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_priv.h
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2008-03-05 21:44:14 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-17 21:38:10 -0400
commit155cc6b784a959ed456fe46dca522e1d28b3b718 (patch)
treee88b9041570f299497a6f9aac7e01797affed205 /fs/xfs/xfs_log_priv.h
parentb589334c7a1fff85d2f009d5db4c34fad48925e9 (diff)
[XFS] Use atomics for iclog reference counting
Now that we update the log tail LSN less frequently on transaction completion, we pass the contention straight to the global log state lock (l_iclog_lock) during transaction completion. We currently have to take this lock to decrement the iclog reference count. there is a reference count on each iclog, so we need to take þhe global lock for all refcount changes. When large numbers of processes are all doing small trnasctions, the iclog reference counts will be quite high, and the state change that absolutely requires the l_iclog_lock is the except rather than the norm. Change the reference counting on the iclogs to use atomic_inc/dec so that we can use atomic_dec_and_lock during transaction completion and avoid the need for grabbing the l_iclog_lock for every reference count decrement except the one that matters - the last. SGI-PV: 975671 SGI-Modid: xfs-linux-melb:xfs-kern:30505a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r--fs/xfs/xfs_log_priv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index c6244cc733c0..01c63db25a1d 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -339,7 +339,7 @@ typedef struct xlog_iclog_fields {
339#endif 339#endif
340 int ic_size; 340 int ic_size;
341 int ic_offset; 341 int ic_offset;
342 int ic_refcnt; 342 atomic_t ic_refcnt;
343 int ic_bwritecnt; 343 int ic_bwritecnt;
344 ushort_t ic_state; 344 ushort_t ic_state;
345 char *ic_datap; /* pointer to iclog data */ 345 char *ic_datap; /* pointer to iclog data */