From: xaiki@sgi.com
To: xfs@oss.sgi.com
Cc: Niv Sardi <xaiki@sgi.com>
Subject: [[PATCH, RESEND]] reduce imaxpct for big filesystems,
Date: Mon, 12 Nov 2007 14:48:48 +1100 [thread overview]
Message-ID: <1194839329-22003-5-git-send-email-xaiki@sgi.com> (raw)
In-Reply-To: <1194839329-22003-4-git-send-email-xaiki@sgi.com>
From: Niv Sardi <xaiki@sgi.com>
imaxpct is set to 25% for FS < 1 TB,
then 5% for FS < 50 TB,
and then 1%.
It is implemented as a step function in calc_default_imaxpct()
---
xfsprogs/mkfs/xfs_mkfs.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 3689eb7..78c2c77 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -374,6 +374,21 @@ validate_log_size(__uint64_t logblocks, int blocklog, int min_logblocks)
}
}
+int
+calc_default_imaxpct(
+ int blocklog,
+ __uint64_t dblocks)
+{
+ if (dblocks < TERABYTES(1, blocklog)) {
+ return XFS_DFL_IMAXIMUM_PCT;
+ } else if (dblocks < TERABYTES(50, blocklog)) {
+ return 5;
+ }
+
+ return 1;
+}
+
+
void
calc_default_ag_geometry(
int blocklog,
@@ -1986,7 +2001,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
dfile, isize, (long long)agcount, (long long)agsize,
"", sectorsize, attrversion,
"", blocksize, (long long)dblocks,
- imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT,
+ calc_default_imaxpct(blocklog, dblocks),
"", dsunit, dswidth,
dirversion, dirversion == 1 ? blocksize : dirblocksize,
logfile, 1 << blocklog, (long long)logblocks,
@@ -2023,7 +2038,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
(__uint8_t)(rtextents ?
libxfs_highbit32((unsigned int)rtextents) : 0);
sbp->sb_inprogress = 1; /* mkfs is in progress */
- sbp->sb_imax_pct = imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT;
+ sbp->sb_imax_pct = calc_default_imaxpct(blocklog, dblocks);
sbp->sb_icount = 0;
sbp->sb_ifree = 0;
sbp->sb_fdblocks = dblocks - agcount * XFS_PREALLOC_BLOCKS(mp) -
--
1.5.3.5
next prev parent reply other threads:[~2007-11-12 4:05 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-29 7:56 Default mount options (that suck less) Niv Sardi
2007-10-29 8:55 ` David Chinner
2007-10-29 10:44 ` nscott
2007-10-29 14:01 ` Eric Sandeen
2007-10-29 21:26 ` David Chinner
2007-10-29 14:03 ` Eric Sandeen
2007-10-29 15:05 ` Hannes Dorbath
2007-10-29 15:07 ` Eric Sandeen
2007-10-30 8:40 ` Stewart Smith
2007-10-31 4:11 ` Nathan Scott
2007-10-31 4:13 ` Eric Sandeen
2007-10-29 21:05 ` David Chinner
2007-10-29 15:26 ` Eric Sandeen
2007-10-29 15:44 ` Chris Wedgwood
2007-10-29 15:51 ` Eric Sandeen
2007-10-30 0:45 ` Timothy Shimmin
2007-10-31 11:05 ` James Braid
2007-10-31 11:27 ` Justin Piszcz
2007-11-01 0:47 ` James Braid
2007-10-31 15:21 ` Eric Sandeen
2007-10-31 15:41 ` Chris Wedgwood
2007-11-01 0:32 ` James Braid
2007-10-29 23:48 ` David Chinner
2007-10-31 23:35 ` Niv Sardi
2007-10-31 23:40 ` Niv Sardi
2007-11-01 1:17 ` Niv Sardi
2007-11-01 2:27 ` Eric Sandeen
2007-11-12 2:28 ` Niv Sardi
2007-11-12 3:10 ` David Chinner
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to log version 2 xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to version 2 attributes xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, xaiki
2007-11-12 3:48 ` xaiki [this message]
2007-11-12 3:48 ` [[PATCH, RESEND]] less AGs for single disks configs xaiki
2007-11-12 9:01 ` David Chinner
2007-11-12 14:57 ` Justin Piszcz
2007-11-12 20:31 ` David Chinner
2007-11-12 6:33 ` [[PATCH, RESEND]] reduce imaxpct for big filesystems, David Chinner
2007-11-12 6:31 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, David Chinner
2007-11-13 0:51 ` Niv Sardi
2007-11-12 6:27 ` [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly David Chinner
2007-11-12 6:24 ` [[PATCH, RESEND]] Default to version 2 attributes David Chinner
2007-11-12 6:23 ` [[PATCH, RESEND]] Default to log version 2 David Chinner
2007-11-13 4:10 ` RESEND(2) xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 1/6] Default to log version 2 xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 2/6] Default to version 2 attributes xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 3/6] Drop the ability to turn unwritten extents off completly xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 4/6] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 5/6] reduce imaxpct for big filesystems, xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 6/6] less AGs for single disks configs xaiki
2007-11-13 4:47 ` RESEND(2) David Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1194839329-22003-5-git-send-email-xaiki@sgi.com \
--to=xaiki@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox