Re: [Ext2-devel] [RFC] [PATCH] Reducing average ext2 fsck time through fs-wide dirty bit]



On Fri, 2006-03-24 at 10:48 -0800, Andrew Morton wrote:
Valerie Henson <val_henson@xxxxxxxxxxxxxxx> wrote:

On Wed, Mar 22, 2006 at 05:55:03PM -0800, Andrew Morton wrote:
Valerie Henson <val_henson@xxxxxxxxxxxxxxx> wrote:

ext2 is simpler and faster than ext3 in many cases. This is sort of
cheating; ext2 is simpler and faster because it makes no effort to
maintain on-disk consistency and can skip annoying things like, oh,
reserving space in the journal. I am looking for ways to make ext2
cheat even more.


But it might be feasible to knock up an ext3-- in which all the journal
operations are stubbed out.

Hmm... Could we get the mark_buffer_dirty/mark_inode_dirty logic
right?

All things are possible ;) One might add a new
ext3_minus_minus_mark_buffer_dirty(), for example, put that in all the
right places.

Probably create a list in the stubbed journal functions and
then mark them dirty in the journal close? However, half the reason
I'm working on ext2 is the simplicity of the code - stubbing it out
would solve the performance problem but not the complexity problem.

Well ext3-- won't do anything to simplify the ext3 codebase. It was just a
thought..

Note that ext3's habit of clearing indirect blocks on truncate would
break some things I want to do in the future. (Insert secret plans
here.)

Ah. I guess one would need to port the ext2 truncate code.



There are reasons for zeroing indirect blocks on truncate:

* There are limits to the size of a single journal transaction
(1/4 of the journal size). When truncating a large fragmented
file, it may require modifying so many block bitmaps and group
descriptors that it forces a journal transaction to close out,
stalling the unlink operation.
* Because of this per-transaction limit, truncate needs to zero
the [dt]indirect blocks starting from the end of the file, in
case it needs to start a new transaction in the middle of the
truncate (ext3 guarantees that a partially-completed truncate
will be consistent/completed after a crash).
* The read/write of the file's [dt]indirect blocks from the end of
the file to the beginning can take a lot of time, as it does
this in single-block chunks and the blocks are not contiguous.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Ext2-devel mailing list
Ext2-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ext2-devel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: ftruncate-mmap: pages are lost after writing to mmaped file.
    ... I think it is a problem in ext2 (and I haven't been able to reproduce ... That would be slightly unfortunate because we still have Jan's ext3 ... I believe i see the same issue on ext2 as well as ext4. ... case at writeout time, so if dirty bits are getting lost, then it would ...
    (Linux-Kernel)
  • Re: Can I turn off sparse file support + file extent questions
    ... I took your advise and changed it to ext2. ... the journal or something else in the 2.6 ext3 fs. ... > the safest but slowest choice: changes to both data and metadata ... but forces data writes to precede metadata writes; ...
    (comp.os.linux.development.system)
  • [RFC] ext3/jbd, kernel 2.6.13, make ext3 mountable as ext2 when journal is empty.
    ... This patch makes ext3 mountable as ext2 even in case of a power ... When mounting an ext3 file system as ext2 (without journalling) an ... The idea is that, at this point, all checkpointing data is ...
    (Linux-Kernel)
  • Re: Collapse ext2 and 3 please
    ... but they had to make it a new fs so as to not make ext2 unstable ... | ext2 and ext3 with the same kernel. ... filesystem and having it blow up in our faces while you get your sketchy ... the journal, switch journaling off, and unlock. ...
    (Linux-Kernel)
  • Re: ftruncate-mmap: pages are lost after writing to mmaped file.
    ... I think it is a problem in ext2 (and I haven't been able to reproduce ... That would be slightly unfortunate because we still have Jan's ext3 ... number of writable ptes reach 0, when the dirty bits were last cleared ...
    (Linux-Kernel)