From: David Woodhouse <dwmw2@infradead.org>
To: Jarkko Lavinen <jlavi@iki.fi>
Cc: MTD List <linux-mtd@lists.infradead.org>, jffs-dev@axis.com
Subject: Re: Benchmarking JFFS2
Date: Sun, 12 May 2002 20:04:43 +0100 [thread overview]
Message-ID: <912.1021230283@redhat.com> (raw)
In-Reply-To: <13211.1020346858@redhat.com>
dwmw2@infradead.org said:
> 2. We have a 'dirty_list' containing blocks which have _any_ dirty space,
> and we pick blocks from the to garbage-collect from. If there's only a
> few bytes of dirty space, we GC the whole block just to gain a few
> bytes. We should keep a 'very_dirty_list' of blocks with _significant_
> amounts of dirty space and favour that even more when picking blocks
> to GC, especially when doing just-in-time GC rather than from the
> background thread.
I've done this, and every block with more than 50% dirty space now goes on
the 'very_dirty_list'. With the file system snapshot I'd taken from my iPAQ
to investigate what turned out to the double-free bug, the garbage collect
thread was GC'ing 6 blocks immediately after mounting before it stopped.
With the very_dirty_list optimisation, that dropped to two.
I'm beginning to wonder whether we should actually abolish the separate
clean/dirty/very_dirty lists and keep a single used_list in decreasing
order of dirty space, then in jffs2_find_gc_block just pick the block
number $N in that list, where N is exponentially distributed -- high
chance of being '1', small but non-negligible chance of being near the end
of the list.
Keeping the used_list sorted should be fairly simple and cheap - each time
you make a block slightly dirtier you just do a little bit of bubble-sort,
and moving nextblock onto the used_list is fairly rare so it doesn't matter
too much that it's a bit slower.
Does anyone have any ideas on how we'd generate the random number N for
jffs2_find_gc_block() though?
--
dwmw2
next prev parent reply other threads:[~2002-05-12 19:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-02 12:56 Benchmarking JFFS2 Jarkko Lavinen
2002-05-02 13:40 ` David Woodhouse
2002-05-03 17:19 ` Jarkko Lavinen
2002-05-03 17:54 ` David Woodhouse
2002-05-06 12:19 ` Jarkko Lavinen
2002-05-07 15:02 ` David Woodhouse
2002-05-07 15:13 ` Thomas Gleixner
2002-05-07 17:46 ` Jarkko Lavinen
2002-05-07 19:42 ` David Woodhouse
2002-10-08 17:10 ` David Woodhouse
2002-05-12 19:04 ` David Woodhouse [this message]
2002-05-13 8:40 ` Jarkko Lavinen
2002-05-13 9:11 ` David Woodhouse
2002-10-17 10:36 ` Jarkko Lavinen
2003-01-23 12:09 ` David Woodhouse
2003-02-13 12:38 ` Jarkko Lavinen
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=912.1021230283@redhat.com \
--to=dwmw2@infradead.org \
--cc=jffs-dev@axis.com \
--cc=jlavi@iki.fi \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.