diff options
author | David Chinner <dgc@sgi.com> | 2008-04-09 22:18:54 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-04-17 21:50:53 -0400 |
commit | 4679b2d36d53ed508c956337972fbbea8db99a77 (patch) | |
tree | a9b0449c2b0566bb8e8398ff6644def57f7455e3 /fs/xfs/xfs_log.c | |
parent | eb01c9cd87c7a9998c2edf209721ea069e3e3652 (diff) |
[XFS] Reorganise xlog_t for better cacheline isolation of contention
To reduce contention on the log in large CPU count, separate out different
parts of the xlog_t structure onto different cachelines. Move each lock
onto a different cacheline along with all the members that are
accessed/modified while that lock is held.
Also, move the debugging code into debug code.
SGI-PV: 978729
SGI-Modid: xfs-linux-melb:xfs-kern:30772a
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 3cf115d8de75..319b98eb410c 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -1237,9 +1237,9 @@ xlog_alloc_log(xfs_mount_t *mp, | |||
1237 | XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1); | 1237 | XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1); |
1238 | iclog->ic_bp = bp; | 1238 | iclog->ic_bp = bp; |
1239 | iclog->hic_data = bp->b_addr; | 1239 | iclog->hic_data = bp->b_addr; |
1240 | 1240 | #ifdef DEBUG | |
1241 | log->l_iclog_bak[i] = (xfs_caddr_t)&(iclog->ic_header); | 1241 | log->l_iclog_bak[i] = (xfs_caddr_t)&(iclog->ic_header); |
1242 | 1242 | #endif | |
1243 | head = &iclog->ic_header; | 1243 | head = &iclog->ic_header; |
1244 | memset(head, 0, sizeof(xlog_rec_header_t)); | 1244 | memset(head, 0, sizeof(xlog_rec_header_t)); |
1245 | head->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM); | 1245 | head->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM); |
@@ -1250,7 +1250,6 @@ xlog_alloc_log(xfs_mount_t *mp, | |||
1250 | head->h_fmt = cpu_to_be32(XLOG_FMT); | 1250 | head->h_fmt = cpu_to_be32(XLOG_FMT); |
1251 | memcpy(&head->h_fs_uuid, &mp->m_sb.sb_uuid, sizeof(uuid_t)); | 1251 | memcpy(&head->h_fs_uuid, &mp->m_sb.sb_uuid, sizeof(uuid_t)); |
1252 | 1252 | ||
1253 | |||
1254 | iclog->ic_size = XFS_BUF_SIZE(bp) - log->l_iclog_hsize; | 1253 | iclog->ic_size = XFS_BUF_SIZE(bp) - log->l_iclog_hsize; |
1255 | iclog->ic_state = XLOG_STATE_ACTIVE; | 1254 | iclog->ic_state = XLOG_STATE_ACTIVE; |
1256 | iclog->ic_log = log; | 1255 | iclog->ic_log = log; |