From: Jamie Lokier <jamie@shareable.org>
To: "Jörn Engel" <joern@logfs.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: big flash disks?
Date: Mon, 2 Jun 2008 13:48:22 +0100 [thread overview]
Message-ID: <20080602124822.GB2679@shareable.org> (raw)
In-Reply-To: <20080602114339.GB21359@logfs.org>
Jörn Engel wrote:
> On Mon, 2 June 2008 11:41:06 +0100, Jamie Lokier wrote:
> >
> > Won't you get essentially the same by creating a single file on LogFS,
> > and using it for a loopback mount?
>
> In a broad sense, yes. Drawbacks of this setup are the usual ones of
> loop plus a deeper tree for logfs. Instead of having a single 'file'
> with indirect blocks, you also have the inode file with indirect blocks.
> So for every sync, another couple of writes are necessary that don't
> give you any gains in such a setup.
Oh. I've been thinking a lot about log-structured trees (or
tree-structured logs :-) lately, so I tend to assume the tree depth
isn't important, when nodes close to the root are static.
Did you know you can structure the tree such that additional depth
doesn't add many/any additional writes on sync?
The basic idea is for a pointer in a tree node to point not to one
child, but to a small set of potential children. The child-set are a
journal in the jffs2 sense. When reading, you read each block of the
child-set, and pick the most recent. This slows down reading, but
reduces the amount of writing. You still read in O(log tree_size)
blocks, and since most of the extra reads are hot-cache internal tree
blocks, the amount of extra reading is quite small. Child-sets can
overlap to reduce storage duplication, at cost of more operations -
it's a heuristic balancing act. Child-sets are not used for all tree
nodes, especially data. They can be invoked and destroyed dynamically
using heuristics to detect some parts of the tree undergoing lots of
write+sync sequences and others being coalescable writes or not
written.
Put simply: combine logging with phase trees, and you won't have to
replace the whole leaf-to-root path on every sync. Then extra static
depth at the root is free.
-- Jamie
next prev parent reply other threads:[~2008-06-02 12:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-01 18:42 big flash disks? Jamie Lokier
2008-06-01 20:41 ` Josh Boyer
2008-06-02 5:59 ` Artem Bityutskiy
2008-06-02 8:23 ` Jörn Engel
2008-06-02 10:43 ` Jamie Lokier
2008-06-02 11:55 ` Jörn Engel
2008-06-02 12:32 ` Jamie Lokier
2008-06-03 18:09 ` Jörn Engel
2008-06-03 18:44 ` Jamie Lokier
2008-06-04 6:25 ` Jörn Engel
2008-06-02 7:28 ` Jörn Engel
2008-06-02 10:41 ` Jamie Lokier
2008-06-02 11:43 ` Jörn Engel
2008-06-02 12:48 ` Jamie Lokier [this message]
2008-06-03 18:12 ` Jörn Engel
2008-06-03 18:56 ` Jamie Lokier
2008-06-04 6:18 ` Jörn Engel
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=20080602124822.GB2679@shareable.org \
--to=jamie@shareable.org \
--cc=joern@logfs.org \
--cc=linux-mtd@lists.infradead.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