public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Wear-leveling peculiarities
@ 2015-05-18 13:53 Johannes Bauer
  2015-05-18 14:09 ` Johannes Bauer
  2015-05-19  9:17 ` valent.turkovic
  0 siblings, 2 replies; 15+ messages in thread
From: Johannes Bauer @ 2015-05-18 13:53 UTC (permalink / raw)
  To: linux-mtd

Hello list,

I keep track of some devices running an embedded ARM Linux which boots 
from NAND flash. On there, ubifs is used. The deployed kernels are:

Linux version 3.0.59 (###@###) (gcc version 4.5.4 20120305 (prerelease) 
(GCC) ) #1 Mon Apr 29 16:36:42 CEST 2013

Target is ARMv7 (omap2).

The units have been deployed for three years now. Recently, we've been 
seeing units fail more often. This warranted some investigation. I 
pulled dd images of the relevant /dev/mtd device (mtd4 in my case) and 
wrote a small Python script that evaluated the UBIFS LEB headers, in 
particular the erase count. I expected to see a uniform distribution of 
erases all around the flash.

But on the contrary, we see the very opposite:

http://imgur.com/a/d5Bhl

Here you see graphs of two units. You can see that the pattern is 
identical: Lots of pages which were written seldomly, lots of pages 
which were written frequently. Very little inbetween. This is what the 
histograms show (erase count on the X axis and their occurences on the Y 
axis).

The other graphs are even more disturbing. It shows the physical layout 
of the NAND flash. Each pixel corresponds to one LEB. Everything upwards 
of 100 erases is red (the scale is linear, shown at the very bottom). 
You can see that in some areas, pages are erased very often while in 
others they're virtually constant.

This is something I'd expect if the FS would not perform wear-leveling 
(files that are written in-place cause page erases at the same locations 
over and over). But ubifs should take care of this, shouldn't it? It 
might well be that my understanding of ubifs is too limited so I don't 
grasp the whole picture. In any case, any advice is greatly appreciated.

Thanks in advance,
Johannes

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

end of thread, other threads:[~2015-05-26 18:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-18 13:53 Wear-leveling peculiarities Johannes Bauer
2015-05-18 14:09 ` Johannes Bauer
2015-05-18 17:58   ` Richard Weinberger
2015-05-18 17:59     ` Richard Weinberger
2015-05-18 20:38     ` Johannes Bauer
     [not found]     ` <555A4D38.3070702@spornkuller.de>
2015-05-18 20:47       ` Richard Weinberger
2015-05-26  9:38         ` Johannes Bauer
2015-05-26 10:08           ` Richard Weinberger
2015-05-26 11:14             ` Johannes Bauer
2015-05-26 16:19               ` Jeff Lauruhn (jlauruhn)
2015-05-26 16:24                 ` Johannes Bauer
2015-05-26 16:29                   ` Richard Weinberger
2015-05-26 18:20               ` Ezequiel Garcia
2015-05-19  9:17 ` valent.turkovic
2015-05-26  9:43   ` Johannes Bauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox