From: Artem Bityutskiy <dedekind1@gmail.com>
To: Richard Weinberger <richard@nod.at>
Cc: Heinz.Egger@linutronix.de, tglx@linutronix.de,
linux-mtd@lists.infradead.org, tim.bird@am.sony.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] [RFC] UBI: Add checkpoint on-chip layout
Date: Fri, 11 May 2012 15:21:04 +0300 [thread overview]
Message-ID: <1336738864.2625.66.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <4FACFFED.40105@nod.at>
[-- Attachment #1: Type: text/plain, Size: 2447 bytes --]
On Fri, 2012-05-11 at 14:02 +0200, Richard Weinberger wrote:
> > Please, unless it is size-critical, always leave some unused space in
> > on-flash data structure for possible future extensions, and initialize
> > them to 0.
>
> If the fastmap on-flash layout changes, I'll increment the "version" field.
> But I can leave some space.
But if you have extra space you _often_ have chances to add new features
in a backward-compatible way, without incrementing the version, which
would make new images backward-incompatible. It really may make a big
difference.
This is not _always_ possible, of course, but sometimes it is. So if it
does not hurt, leave extra space in all on flash data structures (but
probably not in those you have large arrays of, though). This is just a
good practice I think. For some reason I have a feeling that we
discussed this already :-) I think I sent you an e-mail with various
questions which you did not answer long time ago, but it was long time
ago, so does not matter anymore.
> > What's the perpose of having these pools - once you read all the
> > information from the fastmap and the wl subsystem inserts it to the
> > RB-trees - you already know this data. Why you need to store this on the
> > flash? This whole pool think look redundant and unneeded.
>
> We need this pool to find all PEBs that have changed since we wrote the last
> checkpoint (or fastmap).
OK, I see, thanks.
> BTW: That's why we named it "UBI Checkpointing".
> If all PEBs in the pool are used (IOW no longer empty) we fill the pool with empty PEBs
> and write a new checkpoint.
> While reading the checkpoint we know that only PEBs within the pool my have changed...
>
> Without this pool we'd have to write the checkpoint every time the EBA changes
> or we'd have to scan the whole list of free PEBs while attaching.
I just had an impression that you write the fastmap only on unmount or
at some kind of "sync" points, and power cuts always would lead to
re-scan.
> > It is weird that you do not have an array of ECs instead for _every_
> > PEB. Why wasting the flash and time writing/reading this data?
>
> By array of ECs you mean that all ec values are written to the flash
> and pnum is the index?
> Sounds sane.
Yes, to me it sounds like the only sane way, unless there is a strong
reason to have redundant "pnum" fields. :-)
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org, tim.bird@am.sony.com,
tglx@linutronix.de, linux-kernel@vger.kernel.org,
Heinz.Egger@linutronix.de
Subject: Re: [PATCH 1/7] [RFC] UBI: Add checkpoint on-chip layout
Date: Fri, 11 May 2012 15:21:04 +0300 [thread overview]
Message-ID: <1336738864.2625.66.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <4FACFFED.40105@nod.at>
[-- Attachment #1: Type: text/plain, Size: 2447 bytes --]
On Fri, 2012-05-11 at 14:02 +0200, Richard Weinberger wrote:
> > Please, unless it is size-critical, always leave some unused space in
> > on-flash data structure for possible future extensions, and initialize
> > them to 0.
>
> If the fastmap on-flash layout changes, I'll increment the "version" field.
> But I can leave some space.
But if you have extra space you _often_ have chances to add new features
in a backward-compatible way, without incrementing the version, which
would make new images backward-incompatible. It really may make a big
difference.
This is not _always_ possible, of course, but sometimes it is. So if it
does not hurt, leave extra space in all on flash data structures (but
probably not in those you have large arrays of, though). This is just a
good practice I think. For some reason I have a feeling that we
discussed this already :-) I think I sent you an e-mail with various
questions which you did not answer long time ago, but it was long time
ago, so does not matter anymore.
> > What's the perpose of having these pools - once you read all the
> > information from the fastmap and the wl subsystem inserts it to the
> > RB-trees - you already know this data. Why you need to store this on the
> > flash? This whole pool think look redundant and unneeded.
>
> We need this pool to find all PEBs that have changed since we wrote the last
> checkpoint (or fastmap).
OK, I see, thanks.
> BTW: That's why we named it "UBI Checkpointing".
> If all PEBs in the pool are used (IOW no longer empty) we fill the pool with empty PEBs
> and write a new checkpoint.
> While reading the checkpoint we know that only PEBs within the pool my have changed...
>
> Without this pool we'd have to write the checkpoint every time the EBA changes
> or we'd have to scan the whole list of free PEBs while attaching.
I just had an impression that you write the fastmap only on unmount or
at some kind of "sync" points, and power cuts always would lead to
re-scan.
> > It is weird that you do not have an array of ECs instead for _every_
> > PEB. Why wasting the flash and time writing/reading this data?
>
> By array of ECs you mean that all ec values are written to the flash
> and pnum is the index?
> Sounds sane.
Yes, to me it sounds like the only sane way, unless there is a strong
reason to have redundant "pnum" fields. :-)
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-05-11 12:18 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 17:38 [RFC v2] UBI: UBIVIS (aka checkpointing) support Richard Weinberger
2012-05-09 17:38 ` Richard Weinberger
2012-05-09 17:38 ` [PATCH 1/7] [RFC] UBI: Add checkpoint on-chip layout Richard Weinberger
2012-05-09 17:38 ` Richard Weinberger
2012-05-11 11:17 ` Artem Bityutskiy
2012-05-11 11:17 ` Artem Bityutskiy
2012-05-11 12:02 ` Richard Weinberger
2012-05-11 12:02 ` Richard Weinberger
2012-05-11 12:21 ` Artem Bityutskiy [this message]
2012-05-11 12:21 ` Artem Bityutskiy
2012-05-11 17:15 ` Richard Weinberger
2012-05-11 17:15 ` Richard Weinberger
2012-05-11 18:56 ` Artem Bityutskiy
2012-05-11 18:56 ` Artem Bityutskiy
2012-05-11 19:15 ` Richard Weinberger
2012-05-11 19:15 ` Richard Weinberger
2012-05-09 17:38 ` [PATCH 2/7] [RFC] UBI: Add checkpoint struct to ubi_device Richard Weinberger
2012-05-09 17:38 ` Richard Weinberger
2012-05-09 17:38 ` [PATCH 3/7] [RFC] UBI: Export next_sqnum() Richard Weinberger
2012-05-09 17:38 ` Richard Weinberger
2012-05-09 17:38 ` [PATCH 4/7] [RFC] UBI: Export compare_lebs() Richard Weinberger
2012-05-09 17:38 ` Richard Weinberger
2012-05-09 17:38 ` [PATCH 5/7] [RFC] UBI: Make wl subsystem checkpoint aware Richard Weinberger
2012-05-09 17:38 ` Richard Weinberger
2012-05-09 17:38 ` [PATCH 6/7] [RFC] UBI: Implement checkpointing support Richard Weinberger
2012-05-09 17:38 ` Richard Weinberger
2012-05-09 17:38 ` [PATCH 7/7] [RFC] UBI: wire up checkpointing Richard Weinberger
2012-05-09 17:38 ` Richard Weinberger
2012-05-10 4:26 ` [RFC v2] UBI: UBIVIS (aka checkpointing) support Artem Bityutskiy
2012-05-10 4:26 ` Artem Bityutskiy
2012-05-10 8:33 ` Richard Weinberger
2012-05-10 8:33 ` Richard Weinberger
2012-05-11 10:46 ` Artem Bityutskiy
2012-05-11 10:46 ` Artem Bityutskiy
2012-05-11 10:49 ` Richard Weinberger
2012-05-11 10:49 ` Richard Weinberger
2012-05-11 11:26 ` Artem Bityutskiy
2012-05-11 11:26 ` Artem Bityutskiy
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=1336738864.2625.66.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=Heinz.Egger@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=tglx@linutronix.de \
--cc=tim.bird@am.sony.com \
/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.