aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_priv.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-08-12 06:50:08 -0400
committerBen Myers <bpm@sgi.com>2013-08-13 17:21:21 -0400
commit4bb928cdb900d0614f4766d5f1ca5bc3844f7656 (patch)
tree9bbc2d358dc02c3ff2d9a39cf91c9b485cba288d /fs/xfs/xfs_log_priv.h
parent991aaf65ff0addc2692cfa8dc1ff082dcf69d26f (diff)
xfs: split the CIL lock
The xc_cil_lock is used for two purposes - to protect the CIL itself, and to protect the push/commit state and lists. These are two logically separate structures and operations, so can have their own locks. This means that pushing on the CIL and the commit wait ordering won't contend for a lock with other transactions that are completing concurrently. As the CIL insertion is the hottest path throught eh CIL, this is a big win. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r--fs/xfs/xfs_log_priv.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index edd0964fb65c..136654b9400d 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -278,14 +278,17 @@ struct xfs_cil {
278 struct xlog *xc_log; 278 struct xlog *xc_log;
279 struct list_head xc_cil; 279 struct list_head xc_cil;
280 spinlock_t xc_cil_lock; 280 spinlock_t xc_cil_lock;
281
282 struct rw_semaphore xc_ctx_lock ____cacheline_aligned_in_smp;
281 struct xfs_cil_ctx *xc_ctx; 283 struct xfs_cil_ctx *xc_ctx;
282 struct rw_semaphore xc_ctx_lock; 284
285 spinlock_t xc_push_lock ____cacheline_aligned_in_smp;
286 xfs_lsn_t xc_push_seq;
283 struct list_head xc_committing; 287 struct list_head xc_committing;
284 wait_queue_head_t xc_commit_wait; 288 wait_queue_head_t xc_commit_wait;
285 xfs_lsn_t xc_current_sequence; 289 xfs_lsn_t xc_current_sequence;
286 struct work_struct xc_push_work; 290 struct work_struct xc_push_work;
287 xfs_lsn_t xc_push_seq; 291} ____cacheline_aligned_in_smp;
288};
289 292
290/* 293/*
291 * The amount of log space we allow the CIL to aggregate is difficult to size. 294 * The amount of log space we allow the CIL to aggregate is difficult to size.