public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Artem B. Bityutskiy" <dedekind@yandex.ru>
To: "zhao, forrest" <forrest.zhao@intel.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: The problem that I didn't think out
Date: Mon, 28 Nov 2005 13:24:10 +0300	[thread overview]
Message-ID: <438ADACA.3090102@yandex.ru> (raw)
In-Reply-To: <1133144458.3156.15.camel@localhost.localdomain>

zhao, forrest wrote:
> I think keeping track of a list of 10 most worn out eraseblocks
> is hard to be O(1) since this list is changed dynamically.
> In particular, we need to recalculate the list after every update
> operation; in order to recalculate the list we need to keep the usage
> information of all erase blocks in RAM in sorted manner. So if this is
> the case, the RAM occupation is O(N).
> 
Hmm, I meant the following.

1. How to choose an eraseblock to garbage collect.

We split all the eraseblocks onto several (virtual) groups, N 
eraseblocks in each. For example, 30 eraseblocks in each group: 0-29. 
30-59, ... One of the groups is "current".

Suppose we have mounted JFFS3. Assign group 0 to be "current". GC asks 
us to choose an eraseblock to GC. We search for the "best" candidate 
only in the current group. And GC it. During search we also find out M 
"best" candidates. Then switch the current group to the next. Next time 
we'll search in the next group. We'll correct our "best" list. Etc.

Something like this. Not, this wont give us absolutely best candidates. 
But still.

The description is just an idea, don't take it as a serious description.

-- 
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.

      reply	other threads:[~2005-11-28 10:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-25  8:36 The problem that I didn't think out Zhao, Forrest
2005-11-25 11:58 ` Artem B. Bityutskiy
2005-11-27 13:01   ` Ferenc Havasi
2005-11-27 13:20     ` Artem B. Bityutskiy
2005-11-28  0:32       ` Ferenc Havasi
2005-11-28 10:15         ` Artem B. Bityutskiy
2005-11-28  2:20   ` zhao, forrest
2005-11-28 10:24     ` Artem B. Bityutskiy [this message]

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=438ADACA.3090102@yandex.ru \
    --to=dedekind@yandex.ru \
    --cc=forrest.zhao@intel.com \
    --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