xfs
[Top] [All Lists]

Re: [[PATCH, RESEND]] reduce imaxpct for big filesystems,

To: xaiki@xxxxxxx
Subject: Re: [[PATCH, RESEND]] reduce imaxpct for big filesystems,
From: David Chinner <dgc@xxxxxxx>
Date: Mon, 12 Nov 2007 17:33:43 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1194839329-22003-5-git-send-email-xaiki@sgi.com>
References: <20071031233516.GB88034736@melbourne.sgi.com> <1194839329-22003-1-git-send-email-xaiki@sgi.com> <1194839329-22003-2-git-send-email-xaiki@sgi.com> <1194839329-22003-3-git-send-email-xaiki@sgi.com> <1194839329-22003-4-git-send-email-xaiki@sgi.com> <1194839329-22003-5-git-send-email-xaiki@sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Mon, Nov 12, 2007 at 02:48:48PM +1100, xaiki@xxxxxxx wrote:
> From: Niv Sardi <xaiki@xxxxxxx>
> 
> 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(

static int

> +     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;
> +}

Comment explaining what it is doing? (i.e. what I had to explain to
you in the first place ;).

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


<Prev in Thread] Current Thread [Next in Thread>