From: Richard Weinberger <rw@linutronix.de>
To: dedekind1@gmail.com
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
tglx@linutronix.de, tim.bird@am.sony.com
Subject: Re: [RFC][PATCH 0/7] UBI checkpointing support
Date: Wed, 07 Mar 2012 22:19:00 +0100 [thread overview]
Message-ID: <4F57D0C4.1050605@linutronix.de> (raw)
In-Reply-To: <1331138007.3463.16.camel@sauron.fi.intel.com>
Am 07.03.2012 17:33, schrieb Artem Bityutskiy:
> Just basic questions to make sure I understand things correctly.
>
> Do you have plans to also change the user-space tools?
Maybe ubiattach to make the attach method selectable.
Attaching by scanning or checkpointing...
> On Tue, 2012-02-14 at 21:06 +0100, Richard Weinberger wrote:
>> 1) A primary checkpoint block, which contains merily a pointer to the
>> erase block(s) which hold the real checkpointing data.
>>
>> This primary block is guaranteed to be held within the first N
>> eraseblocks of a device. N is momentarily set to 16, but it might
>> be necessary to make this configurable in some way.
>
> Does it mean that you reserve the first 16 PEBs for the primary block?
The current implementation selects out one of the first 64 blocks.
I know I wrote 16 in the initial RFC, but it's 64.
But it does not reserve them.
While writing a new checkpoint it tries to select an other early block.
If no new early block is available it reuses the old one.
> I guess we need to carefully look an this number and make the default to
> be good enough for the general case.
Yep. The current number was chosen randomly. :D
>> 2) The secondary checkpoint blocks, which contain the real
>> checkpointing data (physical to logical eraseblock relations,
>> erase counts, sequence numbers ...)
>
>> Aside of that the checkpointing data contains a list of blocks
>> which belong to the active working pool. The active working pool is
>> a fixed number of blocks for shortterm, longterm and unknown
>> storage time, which can be modified before the next checkpoint set
>> is written to FLASH. These blocks need to be scanned in the
>> conventional UBI scan mode.
>
> BTW, WRT short-term etc - how about just killing these concepts? I am
> really not sure they make much sense anyway and give any improvements.
Good idea!
> I guess this would simplify things for you as well. I'd vote for
> removing them.
>
>> The reason for these pool blocks is to reduce the checkpoint
>> updates to the necessary minimum to avoid accelerated device
>> wearout in scenarios where data changes rapidly. The checkpoint
>> data is updated whenever a working pool runs out of blocks.
>>
>> The number of pool blocks can be defined with a config option at
>> the moment, but this could also be done at runtime via sysfs. In
>> case of a change the checkpointing data would be reconstructed.
>
> Id suggest to introduce as few configuration knob as possible. My
> experience show that they usually only hurt. I'd stick to this rule for
> most cases: no user, no knob.
Yeah.
>> So the checkpoint scan consists of the following steps:
>>
>> 1) Find the primary checkpoint block by scanning the start of the
>> device.
>>
>> 2) Read the real checkpoint data and construct the UBI device info
>> structures.
>>
>> 3) Scan the pool blocks.
>>
>> All these operations scan a limited number of erase blocks which makes
>> the UBI init O(1) and independent of the device size.
>
> Well, is it really true? The larger is the flash the more you read and
> process anyway, and it is still linear, but the multiplier becomes very
> small, so this is a huge improvement.
Yes. :)
Using checkpointing UBI only has to scan a fixed (independent of the
flash size!) number of blocks.
>> The checkpoint functionality is fully compatible with existing UBI
>> deployments. If no checkpoint blocks can be found then the device is
>> scanned and the checkpoint blocks are created from the scanned
>> information.
>>
>> Aside of review and testing it needs to be decided, whether the number
>> of pool blocks should be deduced from the device size (number of
>> physical eraseblocks) or made configurable at compile or runtime.
>
> I would go for automatic decisions. Manual configuration can always be
> added later if needed.
>
>> Thanks to the folks at CELF who sponsored this work!
>
> Indeed thanks! And thank you Richard!
Thanks,
//richard
next prev parent reply other threads:[~2012-03-07 21:19 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-14 20:06 [RFC][PATCH 0/7] UBI checkpointing support Richard Weinberger
2012-02-14 20:06 ` [RFC][PATCH 1/7] MTD: UBI: Add checkpoint on-chip layout Richard Weinberger
2012-03-07 16:09 ` Artem Bityutskiy
2012-03-07 21:02 ` Richard Weinberger
2012-03-07 22:09 ` Thomas Gleixner
2012-03-07 22:23 ` Thomas Gleixner
2012-02-14 20:06 ` [RFC][PATCH 2/7] MTD: UBI: Add checkpoint struct to ubi_device Richard Weinberger
2012-02-14 20:06 ` [RFC][PATCH 3/7] MTD: UBI: Export next_sqnum() Richard Weinberger
2012-02-14 20:06 ` [RFC][PATCH 4/7] MTD: UBI: Make wl subsystem checkpoint aware Richard Weinberger
2012-02-14 20:06 ` [RFC][PATCH 5/7] MTD: UBI: Make process_eb() " Richard Weinberger
2012-02-14 20:06 ` [RFC][PATCH 6/7] MTD: UBI: Implement checkpointing support Richard Weinberger
2012-02-20 16:31 ` Shmulik Ladkani
2012-02-14 20:06 ` [RFC][PATCH 7/7] MTD: UBI: wire up checkpointing Richard Weinberger
2012-02-19 13:57 ` Shmulik Ladkani
2012-02-19 14:08 ` Richard Weinberger
2012-02-19 14:40 ` Shmulik Ladkani
2012-02-19 15:08 ` Richard Weinberger
2012-02-29 11:35 ` [RFC][PATCH 0/7] UBI checkpointing support Artem Bityutskiy
2012-02-29 11:36 ` Artem Bityutskiy
2012-02-29 11:40 ` Richard Weinberger
2012-02-29 12:01 ` Artem Bityutskiy
2012-02-29 12:09 ` Artem Bityutskiy
2012-03-07 16:04 ` Artem Bityutskiy
2012-03-07 21:01 ` Richard Weinberger
2012-03-08 11:22 ` Artem Bityutskiy
2012-03-07 16:33 ` Artem Bityutskiy
2012-03-07 21:19 ` Richard Weinberger [this message]
2012-03-08 7:08 ` Shmulik Ladkani
2012-03-08 9:21 ` Richard Weinberger
2012-03-08 11:58 ` Artem Bityutskiy
2012-03-08 13:16 ` Shmulik Ladkani
2012-03-08 11:54 ` 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=4F57D0C4.1050605@linutronix.de \
--to=rw@linutronix.de \
--cc=dedekind1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox