public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: "Frédéric Bohé" <frederic.bohe@bull.net>
Cc: Andreas Dilger <adilger@sun.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH v2] ext4: fix initialization of UNINIT bitmap blocks
Date: Wed, 24 Sep 2008 12:23:39 -0400	[thread overview]
Message-ID: <20080924162339.GH9929@mit.edu> (raw)
In-Reply-To: <1222261048.3511.23.camel@frecb007923.frec.bull.fr>

On Wed, Sep 24, 2008 at 02:57:28PM +0200, Frédéric Bohé wrote:
> 
> You are right ext4_group_info structure was not as big as I thought.
> Do you mean that making ext4_group_info generic for both mballoc and
> oldalloc will reduce the code complexity ?

Long-term, we want to do this, yes.  There's a lot of stuff in mballoc
that we probably need to move out into generic code.  I'll sending
patches shortly that move the /proc handling code into the generic
code, and also saving 2k of compiled object code in the process.

Here, I think main argument is since mballoc is on by default, and the
benefits of this are huge, is that we would save memory by using an
unused bit in ext4_group_info.

A related question is at what point should we remove the oldalloc code
altogehter?

> > Also, if you are considering this approach (to initialize the in-memory
> > bitmaps at mount time) they should be written to disk even if unused.
> > Please also consider doing the inode table zeroing at the same time.
> > This would allow uninit_bg to avoid doing it at mke2fs time.
> 
> In fact, I was not considering doing this at mount time, but it could be
> a good approach.
> Anyway, I don't understand why we should write bitmaps to disk after
> that, and why we should zeroing the inode table.  Don't we end up with a
> fast mkfs and a slow mount doing all the stuff older mkfs was doing ?
> The UNINIT feature would become less interesting.

It would be an absolute disaster to do this at mount time, especially
if it included zeroing the inode table.  Zeroing the inode table must
be done in a background kernel thread, with appropriate locks to avoid
races with the block allocation code (this is one of the places where
eliminating the old allocation code would make life easier).

I don't think we should worry about initializing the bitmaps in
advance.  There's just no advantage in doing that for the bitmaps.
For the inode table we want to do this for safety's sake, but that's
not a concern for the bitmaps.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-09-24 16:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-15 11:41 [PATCH] ext4: fix initialization of UNINIT bitmap blocks Frédéric Bohé
2008-09-15 12:16 ` [PATCH v2] " Frédéric Bohé
2008-09-15 13:36   ` Aneesh Kumar K.V
2008-09-15 14:30     ` Frédéric Bohé
2008-09-18 13:45       ` Frédéric Bohé
2008-09-21  0:44         ` Theodore Tso
2008-09-22  8:09           ` Frédéric Bohé
2008-09-22  8:47             ` Aneesh Kumar K.V
2008-09-22  9:32               ` Frédéric Bohé
2008-09-23 23:13                 ` Andreas Dilger
2008-09-24 12:57                   ` Frédéric Bohé
2008-09-24 16:23                     ` Theodore Tso [this message]
2008-09-25 23:04                       ` Andreas Dilger
2008-09-24 12:38                 ` Frédéric Bohé
2008-09-26 13:17                   ` Frédéric Bohé
2008-09-28 22:49   ` Theodore Tso

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=20080924162339.GH9929@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger@sun.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=frederic.bohe@bull.net \
    --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