Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70820
b: refs/heads/master
c: 1cb5125
h: refs/heads/master
v: v3
  • Loading branch information
Eric Sandeen authored and Tim Shimmin committed Oct 15, 2007
1 parent e49dbd9 commit 55d50fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40906630f18fdf5ac27f5928c20f76eeac8fb0f0
refs/heads/master: 1cb51258758d725028e9ee9688d462de125a053d
33 changes: 7 additions & 26 deletions trunk/fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,10 +1025,7 @@ xlog_bdstrat_cb(struct xfs_buf *bp)
/*
* Return size of each in-core log record buffer.
*
* Low memory machines only get 2 16KB buffers. We don't want to waste
* memory here. However, all other machines get at least 2 32KB buffers.
* The number is hard coded because we don't care about the minimum
* memory size, just 32MB systems.
* All machines get 8 x 32KB buffers by default, unless tuned otherwise.
*
* If the filesystem blocksize is too large, we may need to choose a
* larger size since the directory code currently logs entire blocks.
Expand All @@ -1041,17 +1038,10 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
int size;
int xhdrs;

if (mp->m_logbufs <= 0) {
if (xfs_physmem <= btoc(128*1024*1024)) {
log->l_iclog_bufs = XLOG_MIN_ICLOGS;
} else if (xfs_physmem <= btoc(400*1024*1024)) {
log->l_iclog_bufs = XLOG_MED_ICLOGS;
} else { /* 256K with 32K bufs */
log->l_iclog_bufs = XLOG_MAX_ICLOGS;
}
} else {
if (mp->m_logbufs <= 0)
log->l_iclog_bufs = XLOG_MAX_ICLOGS;
else
log->l_iclog_bufs = mp->m_logbufs;
}

/*
* Buffer size passed in from mount system call.
Expand Down Expand Up @@ -1082,18 +1072,9 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
goto done;
}

/*
* Special case machines that have less than 32MB of memory.
* All machines with more memory use 32KB buffers.
*/
if (xfs_physmem <= btoc(32*1024*1024)) {
/* Don't change; min configuration */
log->l_iclog_size = XLOG_RECORD_BSIZE; /* 16k */
log->l_iclog_size_log = XLOG_RECORD_BSHIFT;
} else {
log->l_iclog_size = XLOG_BIG_RECORD_BSIZE; /* 32k */
log->l_iclog_size_log = XLOG_BIG_RECORD_BSHIFT;
}
/* All machines use 32KB buffers by default. */
log->l_iclog_size = XLOG_BIG_RECORD_BSIZE;
log->l_iclog_size_log = XLOG_BIG_RECORD_BSHIFT;

/* the default log size is 16k or 32k which is one header sector */
log->l_iclog_hsize = BBSIZE;
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/xfs/xfs_log_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ struct xfs_mount;
*/

#define XLOG_MIN_ICLOGS 2
#define XLOG_MED_ICLOGS 4
#define XLOG_MAX_ICLOGS 8
#define XLOG_HEADER_MAGIC_NUM 0xFEEDbabe /* Invalid cycle number */
#define XLOG_VERSION_1 1
Expand Down

0 comments on commit 55d50fd

Please sign in to comment.