linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* UBI: Fastmap updates (v7+)
@ 2012-06-01 15:16 Richard Weinberger
  2012-06-01 15:16 ` [PATCH 01/23] UBI: Fastmap: Fix EC overflow calculation Richard Weinberger
                   ` (23 more replies)
  0 siblings, 24 replies; 27+ messages in thread
From: Richard Weinberger @ 2012-06-01 15:16 UTC (permalink / raw)
  To: linux-mtd
  Cc: dedekind1, adrian.hunter, Heinz.Egger, shmulik.ladkani, tglx,
	tim.bird

These patches apply on Artems fastmap tree.
git://git.infradead.org/linux-ubi.git#fastmap

[PATCH 01/23] UBI: Fastmap: Fix EC overflow calculation
[PATCH 02/23] UBI: Fastmap: Introduce fm_mutex
[PATCH 03/23] UBI: Fastmap: Fix find_fastmap() logic.
[PATCH 04/23] UBI: Fastmap: Write a fastmap also at detaching
[PATCH 05/23] UBI: Fastmap: Fix memory corruption
[PATCH 06/23] UBI: Fastmap: Serialize ubi_wl_get_peb()
[PATCH 07/23] UBI: Fastmap: Simplify ubi_wl_put_fm_peb() logic
[PATCH 08/23] UBI: Fastmap: make ubi_is_fm_block() static
[PATCH 09/23] UBI: Fastmap: Remove ubi->old_fm logic
[PATCH 10/23] UBI: Fastmap: Allocate and free ubi_attach_info in
[PATCH 11/23] UBI: Fastmap: Fix messages
[PATCH 12/23] ubi: fastmap: harmonize medium erase-counter seek
[PATCH 13/23] UBI: Fastmap: Add comments to fastmap paremters
[PATCH 14/23] UBI: Fastmap: Rename fastmap attributes
[PATCH 15/23] UBI: Fastmap: Use reserved_pebs
[PATCH 16/23] UBI: Fastmap: Store bad_peb_count in fastmap
[PATCH 17/23] UBI: Fastmap: Add ubi_assert()
[PATCH 18/23] UBI: Fastmap: Handle bitflipps correctly
[PATCH 19/23] UBI: Fastmap: Handle protection queue correctly
[PATCH 20/23] UBI: Fastmap: Write fastmap only at detach time if
[PATCH 21/23] UBI: Fastmap: Fix error message
[PATCH 22/23] UBI: Fastmap: Address one of Artems TODOs
[PATCH 23/23] UBI: Fastmap: Make checkpatch.pl happy (again)

All patches have been tested with ubi-tests.

TODO:
- Add a function to UBI which produces a free PEB to be used as
  fastmap super block.

Thanks,
//richard

^ permalink raw reply	[flat|nested] 27+ messages in thread
* UBI Fastmap updates (v7++)
@ 2012-06-13 10:41 Richard Weinberger
  0 siblings, 0 replies; 27+ messages in thread
From: Richard Weinberger @ 2012-06-13 10:41 UTC (permalink / raw)
  To: linux-mtd; +Cc: Heinz.Egger, tglx, shmulik.ladkani, tim.bird, adrian.hunter

Here are some updates for UBI Fastmap.

Beside of mostly minor changes it addresses also two major issues:

1. While creating the fastmap we have to see all PEBs, no PEB has to be in flight.
To ensure this fastmap calls ubi_wl_flush(). But after running more tests I encountered
the problem that sometimes PEBs are still missing. It turned out that  ubi_wl_flush() itself
can create new work which will be processed after ubi_wl_flush() returns.
To fix this I've changed wear_leveling_worker() such that it does not call schedule_erase()
and instead calls the erase worker direly.
Furthermore the erase worker has been changed to omit the call to ensure_wear_leveling(),
which produces again work.
With this changes ubi_wl_flush() really returns only if all work is done and fastmap sees als PEBs.
Artem, I know this is a sledgehammer solution. What do you prefer?

2. wear_leveling_worker() does not use ubi_wl_get_peb(),
therefore some changes are not visible to fastmap.
To address this issue a second small pool has been added.
It contains PEBs to be used by wear_leveling_worker().
For now this pool get refilled and checked by any call to ubi_wl_get_peb().
We cannot refill this pool upon it's empty.
This could trigger a call to ubi_update_fastmap().
As described above  ubi_update_fastmap() calls ubi_wl_flush()
which could call ubi_update_fastmap() again...

Later I'll release some test-scripts and patches to proof the correctness of fastmap.
The patches are mostly very hacky, 
I try to rewrite them in a sane manner such that we can add them into the fastmap code.
E.g. We could cal scan_all() after attaching from a fastmap to proof that fastmap reconstructs
the EBA table correctly.

Happy testing!
//richard

[PATCH 01/21] UBI: Fastmap: enhance find_early_wl_entry()
[PATCH 02/21] UBI: Fastmap: Add PEB leak detection
[PATCH 03/21] UBI: Fastmap: Remove useless code
[PATCH 04/21] UBI: Fastmap: Check for duplicated PEBs in add_aeb()
[PATCH 05/21] UBI: Fastmap: Rewrite scan_pool()
[PATCH 06/21] UBI: Fastmap: Ensure that new_fm->e[0]->ec is always
[PATCH 07/21] UBI: Fastmap: Prevent PEB leak
[PATCH 08/21] UBI: Fastmap: Add scrub support to add_aeb()
[PATCH 09/21] UBI: Fastmap: Make ubi_wl_get_fm_peb() return a
[PATCH 10/21] UBI: Fastmap: Detect whether a PEB has to be unmapped.
[PATCH 11/21] UBI: Fastmap: Adjust comment above ubi_wl_flush()
[PATCH 12/21] UBI: Fastmap: Handle unused "used" PEBs better
[PATCH 13/21] UBI: Fastmap: Introduce WL pool Signed-off-by: Richard
[PATCH 14/21] UBI: Fastmap: Erase PEBs synchronous in
[PATCH 15/21] UBI: Fastmap: Fix NULL-pointer bug
[PATCH 16/21] UBI: Fastmap: Fix loglevel
[PATCH 17/21] UBI: Fastmap: Relax EC self check
[PATCH 18/21] UBI: Fastmap: Store magic values in be32
[PATCH 19/21] UBI: Fastmap: Minor fixes
[PATCH 20/21] UBI: Fastmap: Torture fastmap PEBs that showed bit
[PATCH 21/21] UBI: Fastmap: make checkpatch.pl happy Signed-off-by:

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2012-06-13 10:42 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-01 15:16 UBI: Fastmap updates (v7+) Richard Weinberger
2012-06-01 15:16 ` [PATCH 01/23] UBI: Fastmap: Fix EC overflow calculation Richard Weinberger
2012-06-01 15:16 ` [PATCH 02/23] UBI: Fastmap: Introduce fm_mutex Richard Weinberger
2012-06-01 15:16 ` [PATCH 03/23] UBI: Fastmap: Fix find_fastmap() logic Richard Weinberger
2012-06-01 15:16 ` [PATCH 04/23] UBI: Fastmap: Write a fastmap also at detaching Richard Weinberger
2012-06-01 15:16 ` [PATCH 05/23] UBI: Fastmap: Fix memory corruption Richard Weinberger
2012-06-01 15:16 ` [PATCH 06/23] UBI: Fastmap: Serialize ubi_wl_get_peb() Richard Weinberger
2012-06-01 15:16 ` [PATCH 07/23] UBI: Fastmap: Simplify ubi_wl_put_fm_peb() logic Richard Weinberger
2012-06-01 15:16 ` [PATCH 08/23] UBI: Fastmap: make ubi_is_fm_block() static Richard Weinberger
2012-06-01 15:16 ` [PATCH 09/23] UBI: Fastmap: Remove ubi->old_fm logic Richard Weinberger
2012-06-01 15:16 ` [PATCH 10/23] UBI: Fastmap: Allocate and free ubi_attach_info in ubi_attach() Richard Weinberger
2012-06-01 15:16 ` [PATCH 11/23] UBI: Fastmap: Fix messages Richard Weinberger
2012-06-01 15:16 ` [PATCH 12/23] ubi: fastmap: harmonize medium erase-counter seek algorithm Richard Weinberger
2012-06-01 15:16 ` [PATCH 13/23] UBI: Fastmap: Add comments to fastmap paremters Richard Weinberger
2012-06-01 15:16 ` [PATCH 14/23] UBI: Fastmap: Rename fastmap attributes Richard Weinberger
2012-06-01 15:16 ` [PATCH 15/23] UBI: Fastmap: Use reserved_pebs Richard Weinberger
2012-06-01 15:16 ` [PATCH 16/23] UBI: Fastmap: Store bad_peb_count in fastmap Richard Weinberger
2012-06-01 15:16 ` [PATCH 17/23] UBI: Fastmap: Add ubi_assert() Richard Weinberger
2012-06-01 15:16 ` [PATCH 18/23] UBI: Fastmap: Handle bitflipps correctly Richard Weinberger
2012-06-01 15:16 ` [PATCH 19/23] UBI: Fastmap: Handle protection queue correctly Richard Weinberger
2012-06-01 15:16 ` [PATCH 20/23] UBI: Fastmap: Write fastmap only at detach time if none is present Richard Weinberger
2012-06-01 15:16 ` [PATCH 21/23] UBI: Fastmap: Fix error message Richard Weinberger
2012-06-01 15:16 ` [PATCH 22/23] UBI: Fastmap: Address one of Artems TODOs Richard Weinberger
2012-06-01 15:16 ` [PATCH 23/23] UBI: Fastmap: Make checkpatch.pl happy (again) Richard Weinberger
2012-06-01 17:50 ` UBI: Fastmap updates (v7+) Artem Bityutskiy
2012-06-01 18:00   ` Richard Weinberger
  -- strict thread matches above, loose matches on Subject: below --
2012-06-13 10:41 UBI Fastmap updates (v7++) Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).