From: Andreas Dilger <adilger@sun.com>
To: "Jose R. Santos" <jrs@us.ibm.com>
Cc: linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [RFC] [PATCH] Flex_BG ialloc awareness V2.
Date: Tue, 11 Dec 2007 04:00:33 -0700 [thread overview]
Message-ID: <20071211110033.GQ3214@webber.adilger.int> (raw)
In-Reply-To: <20071207095212.037ca68a@gara>
On Dec 07, 2007 09:52 -0600, Jose R. Santos wrote:
> Andreas Dilger <adilger@sun.com> wrote:
> > There is no particular reason that this ratio needs to be "*100", it could
> > just as easily be a fraction of 256 and make the multiply into a shift.
> > The free_block_ratio would be 26 in that case.
>
> The idea here is to reserve 10% (free_block_ratio) of free blocks in a
> flexbg for allocation of new files and expansion of existing one. The
> "*100" make the math here easy but this still something that need to be
> tune further. I'm sure we can do this in a series of shifts, just
> haven't spent the time thinking of a clever way to do this.
This is a common misconception for code to have 10% mean 10 / 100. It
is just as good to have 26/256
> > > @@ -622,7 +631,9 @@ struct ext4_super_block {
> > > __le16 s_mmp_interval; /* # seconds to wait in MMP checking */
> > > __le64 s_mmp_block; /* Block for multi-mount protection */
> > > __le32 s_raid_stripe_width; /* blocks on all data disks (N*stride)*/
> > > - __u32 s_reserved[163]; /* Padding to the end of the block */
> > > + __le16 s_flex_bg_size; /* FLEX_BG group size */
> >
> > Shouldn't this be "s_flex_bg_bits"?
>
> I debated whether to store this as the s_flex_bg_size and calculate the
> bits during the filesystem mount time or just stored the bit in the
> super block to begging with. The reason I stored the size is that it
> seemed more in line with the other fields in the super block. I don't
> mind either way since this is more of a style issue, although saving an
> extra 8bits in the super block may be good enough reason to change it.
I'd think being able to avoid the divide for every inode allocation is more
important than 8 bits in the superblock.
> > My preference would be to have "if (EXT2_HAS_INCOMPAT...) { ... } else {"
> > (i.e. add { } for the first part) since there are { } on the second part,
> > and it is just easier to read.
>
> Mine too, but checkpatch complained about this. :)
Time to fix checkpatch it would seem.
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
next prev parent reply other threads:[~2007-12-11 11:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 22:10 [RFC] [PATCH] Flex_BG ialloc awareness V2 Jose R. Santos
2007-12-07 10:14 ` Andreas Dilger
2007-12-07 15:52 ` Jose R. Santos
2007-12-11 11:00 ` Andreas Dilger [this message]
2007-12-11 16:08 ` Jose R. Santos
2007-12-11 23:15 ` Andreas Dilger
2007-12-13 15:51 ` Jose R. Santos
2007-12-13 22:58 ` Andreas Dilger
2007-12-14 2:36 ` Jose R. Santos
2007-12-14 17:01 ` Andreas Dilger
2007-12-14 18:07 ` Jose R. Santos
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=20071211110033.GQ3214@webber.adilger.int \
--to=adilger@sun.com \
--cc=jrs@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).