All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] don't special-case 32MB machines
@ 2007-02-08  1:31 Eric Sandeen
  2007-02-08 19:27 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2007-02-08  1:31 UTC (permalink / raw)
  To: xfs

This one may be a bit silly, but:

All the special cases for 32MB machines probably aren't so useful anymore...

Or maybe this points to the need to bump up the scaling points & sizes a bit?

Also remove duplicate, unused XFS_MAX_RW_NBMAPS definitions in linux subdirs.

 linux-2.4/xfs_lrw.h |    5 -----
 linux-2.6/xfs_lrw.h |    5 -----
 xfs_log.c           |   18 ++++--------------
 xfs_mount.c         |   11 +++--------
 xfs_rw.h            |    9 ---------
 5 files changed, 7 insertions(+), 41 deletions(-)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>

Index: linux/fs/xfs/xfs_log.c
===================================================================
--- linux.orig/fs/xfs/xfs_log.c
+++ linux/fs/xfs/xfs_log.c
@@ -1012,10 +1012,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 at least 2 32KB buffers.
  *
  * If the filesystem blocksize is too large, we may need to choose a
  * larger size since the directory code currently logs entire blocks.
@@ -1070,17 +1067,10 @@ xlog_get_iclog_buffer_size(xfs_mount_t	*
 	}
 
 	/*
-	 * Special case machines that have less than 32MB of memory.
-	 * All machines with more memory use 32KB buffers.
+	 * All machines 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;
-	}
+	log->l_iclog_size = XLOG_BIG_RECORD_BSIZE;	/* 32k */
+	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;
Index: linux/fs/xfs/xfs_mount.c
===================================================================
--- linux.orig/fs/xfs/xfs_mount.c
+++ linux/fs/xfs/xfs_mount.c
@@ -802,15 +802,10 @@ xfs_mountfs(
 	}
 
 	/*
-	 * Set the number of readahead buffers to use based on
-	 * physical memory size.
+	 * Set the number of readahead buffers to use.
 	 */
-	if (xfs_physmem <= 4096)		/* <= 16MB */
-		mp->m_nreadaheads = XFS_RW_NREADAHEAD_16MB;
-	else if (xfs_physmem <= 8192)	/* <= 32MB */
-		mp->m_nreadaheads = XFS_RW_NREADAHEAD_32MB;
-	else
-		mp->m_nreadaheads = XFS_RW_NREADAHEAD_K32;
+	mp->m_nreadaheads = XFS_MAX_RW_NBMAPS;
+
 	if (sbp->sb_blocklog > readio_log) {
 		mp->m_readio_log = sbp->sb_blocklog;
 	} else {
Index: linux/fs/xfs/xfs_rw.h
===================================================================
--- linux.orig/fs/xfs/xfs_rw.h
+++ linux/fs/xfs/xfs_rw.h
@@ -28,15 +28,6 @@ struct xfs_mount;
 #define	XFS_MAX_RW_NBMAPS	4
 
 /*
- * Counts of readahead buffers to use based on physical memory size.
- * None of these should be more than XFS_MAX_RW_NBMAPS.
- */
-#define	XFS_RW_NREADAHEAD_16MB	2
-#define	XFS_RW_NREADAHEAD_32MB	3
-#define	XFS_RW_NREADAHEAD_K32	4
-#define	XFS_RW_NREADAHEAD_K64	4
-
-/*
  * Maximum size of a buffer that we\'ll map.  Making this
  * too big will degrade performance due to the number of
  * pages which need to be gathered.  Making it too small

Index: linux/fs/xfs/linux-2.4/xfs_lrw.h
===================================================================
--- linux.orig/fs/xfs/linux-2.4/xfs_lrw.h
+++ linux/fs/xfs/linux-2.4/xfs_lrw.h
@@ -69,11 +69,6 @@ extern void xfs_inval_cached_trace(struc
 #define xfs_inval_cached_trace(io, offset, len, first, last)
 #endif
 
-/*
- * Maximum count of bmaps used by read and write paths.
- */
-#define	XFS_MAX_RW_NBMAPS	4
-
 extern int xfs_bmap(struct bhv_desc *, xfs_off_t, ssize_t, int,
 			struct xfs_iomap *, int *);
 extern int xfsbdstrat(struct xfs_mount *, struct xfs_buf *);
Index: linux/fs/xfs/linux-2.6/xfs_lrw.h
===================================================================
--- linux.orig/fs/xfs/linux-2.6/xfs_lrw.h
+++ linux/fs/xfs/linux-2.6/xfs_lrw.h
@@ -71,11 +71,6 @@ extern void xfs_inval_cached_trace(struc
 #define xfs_inval_cached_trace(io, offset, len, first, last)
 #endif
 
-/*
- * Maximum count of bmaps used by read and write paths.
- */
-#define	XFS_MAX_RW_NBMAPS	4
-
 extern int xfs_bmap(struct bhv_desc *, xfs_off_t, ssize_t, int,
 			struct xfs_iomap *, int *);
 extern int xfsbdstrat(struct xfs_mount *, struct xfs_buf *);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] don't special-case 32MB machines
  2007-02-08  1:31 [PATCH] don't special-case 32MB machines Eric Sandeen
@ 2007-02-08 19:27 ` Christoph Hellwig
  2007-02-08 20:38   ` Eric Sandeen
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2007-02-08 19:27 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

On Wed, Feb 07, 2007 at 07:31:39PM -0600, Eric Sandeen wrote:
> This one may be a bit silly, but:
> 
> All the special cases for 32MB machines probably aren't so useful anymore...
> 
> Or maybe this points to the need to bump up the scaling points & sizes a 
> bit?
> 
> Also remove duplicate, unused XFS_MAX_RW_NBMAPS definitions in linux 
> subdirs.

Sounds good.  Any chance you could kill off xfs_physmem completely?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] don't special-case 32MB machines
  2007-02-08 19:27 ` Christoph Hellwig
@ 2007-02-08 20:38   ` Eric Sandeen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2007-02-08 20:38 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs

Christoph Hellwig wrote:
> On Wed, Feb 07, 2007 at 07:31:39PM -0600, Eric Sandeen wrote:
>> This one may be a bit silly, but:
>>
>> All the special cases for 32MB machines probably aren't so useful anymore...
>>
>> Or maybe this points to the need to bump up the scaling points & sizes a 
>> bit?
>>
>> Also remove duplicate, unused XFS_MAX_RW_NBMAPS definitions in linux 
>> subdirs.
> 
> Sounds good.  Any chance you could kill off xfs_physmem completely?
> 

Hm, why out of curiosity?  Because you think xfs should never be looking
at system memory, or because you don't like the name, or ...?

-Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-08 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-08  1:31 [PATCH] don't special-case 32MB machines Eric Sandeen
2007-02-08 19:27 ` Christoph Hellwig
2007-02-08 20:38   ` Eric Sandeen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.