aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_priv.h
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2008-04-09 22:18:46 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-17 21:50:39 -0400
commiteb01c9cd87c7a9998c2edf209721ea069e3e3652 (patch)
tree201fc07dac684d6a5a789995c8c35918ea16de7f /fs/xfs/xfs_log_priv.h
parent114d23aae51233b2bc62d8e2a632bcb55de1953d (diff)
[XFS] Remove the xlog_ticket allocator
The ticket allocator is just a simple slab implementation internal to the log. It requires the icloglock to be held when manipulating it and this contributes to contention on that lock. Just kill the entire allocator and use a memory zone instead. While there, allow us to gracefully fail allocation with ENOMEM. SGI-PV: 978729 SGI-Modid: xfs-linux-melb:xfs-kern:30771a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> 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.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index 104b623aa082..c1583960009d 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -242,7 +242,7 @@ typedef struct xlog_res {
242 242
243typedef struct xlog_ticket { 243typedef struct xlog_ticket {
244 sv_t t_sema; /* sleep on this semaphore : 20 */ 244 sv_t t_sema; /* sleep on this semaphore : 20 */
245 struct xlog_ticket *t_next; /* :4|8 */ 245 struct xlog_ticket *t_next; /* :4|8 */
246 struct xlog_ticket *t_prev; /* :4|8 */ 246 struct xlog_ticket *t_prev; /* :4|8 */
247 xlog_tid_t t_tid; /* transaction identifier : 4 */ 247 xlog_tid_t t_tid; /* transaction identifier : 4 */
248 int t_curr_res; /* current reservation in bytes : 4 */ 248 int t_curr_res; /* current reservation in bytes : 4 */
@@ -406,13 +406,8 @@ typedef struct log {
406 sema_t l_flushsema; /* iclog flushing semaphore */ 406 sema_t l_flushsema; /* iclog flushing semaphore */
407 int l_flushcnt; /* # of procs waiting on this 407 int l_flushcnt; /* # of procs waiting on this
408 * sema */ 408 * sema */
409 int l_ticket_cnt; /* free ticket count */
410 int l_ticket_tcnt; /* total ticket count */
411 int l_covered_state;/* state of "covering disk 409 int l_covered_state;/* state of "covering disk
412 * log entries" */ 410 * log entries" */
413 xlog_ticket_t *l_freelist; /* free list of tickets */
414 xlog_ticket_t *l_unmount_free;/* kmem_free these addresses */
415 xlog_ticket_t *l_tail; /* free list of tickets */
416 xlog_in_core_t *l_iclog; /* head log queue */ 411 xlog_in_core_t *l_iclog; /* head log queue */
417 spinlock_t l_icloglock; /* grab to change iclog state */ 412 spinlock_t l_icloglock; /* grab to change iclog state */
418 xfs_lsn_t l_tail_lsn; /* lsn of 1st LR with unflushed 413 xfs_lsn_t l_tail_lsn; /* lsn of 1st LR with unflushed
@@ -478,6 +473,8 @@ extern struct xfs_buf *xlog_get_bp(xlog_t *, int);
478extern void xlog_put_bp(struct xfs_buf *); 473extern void xlog_put_bp(struct xfs_buf *);
479extern int xlog_bread(xlog_t *, xfs_daddr_t, int, struct xfs_buf *); 474extern int xlog_bread(xlog_t *, xfs_daddr_t, int, struct xfs_buf *);
480 475
476extern kmem_zone_t *xfs_log_ticket_zone;
477
481/* iclog tracing */ 478/* iclog tracing */
482#define XLOG_TRACE_GRAB_FLUSH 1 479#define XLOG_TRACE_GRAB_FLUSH 1
483#define XLOG_TRACE_REL_FLUSH 2 480#define XLOG_TRACE_REL_FLUSH 2