Hi,
This indeed seems like a problem in our kernel, but this brings me to
another question.
It seems that YAFFS is marking a lot of blocks as bad, the board itself
is very new so this couldn't be a bad NAND chip and it happens on all of
our boards.
Is there any debugging option that can help me find out why YAFFS is
marking blocks as bad?
Also, could this be somehow related to the fact I am using YAFFS on a
MLC device? Is there some kernel option I need to enable/disable?
Thanks,
Boaz.
On Mon, 2011-04-04 at 08:10 +1200, Charles Manning wrote:
> On Sunday 03 April 2011 17:28:15 Boaz Ben-David wrote:
> > Hi,
> >
> > I'm using yaffs2 on a 2GB MLC Samsung flash.
> > We have a few systems running for testing purposes and I've noticed the
> > following error in the kernel log:
> >
> > Apr 1 07:22:46 wellsense kernel: yaffs: Block struck out
> > Apr 1 13:52:31 wellsense kernel: yaffs-bg-1: page allocation failure.
> > order:8, mode:0x40d0
> > Apr 1 13:52:32 wellsense kernel: [<c023c4b4>] (unwind_backtrace
> > +0x0/0xd0) from [<c028dc80>] (__alloc_pages_nodemask+0x49c/0x504)
> > Apr 1 13:52:32 wellsense kernel: [<c028dc80>] (__alloc_pages_nodemask
> > +0x49c/0x504) from [<c028dd3c>] (__get_free_pages+0x10/0x3c)
> > Apr 1 13:52:32 wellsense kernel: [<c028dd3c>] (__get_free_pages
> > +0x10/0x3c) from [<c02af8a8>] (__kmalloc+0x3c/0x1d4)
> > Apr 1 13:52:32 wellsense kernel: [<c02af8a8>] (__kmalloc+0x3c/0x1d4)
> > from [<c0428b08>] (nand_update_bbt+0x54/0x15c)
> > Apr 1 13:52:32 wellsense kernel: [<c0428b08>] (nand_update_bbt
> > +0x54/0x15c) from [<c0427604>] (nand_default_block_markbad+0x74/0xfc)
> > Apr 1 13:52:32 wellsense kernel: [<c0427604>]
> > (nand_default_block_markbad+0x74/0xfc) from [<c04258f8>]
> > (nand_block_markbad+0x38/0x3c)
> > Apr 1 13:52:32 wellsense kernel: [<c04258f8>] (nand_block_markbad
> > +0x38/0x3c) from [<c0419a20>] (part_block_markbad+0x50/0x64)
> > Apr 1 13:52:32 wellsense kernel: [<c0419a20>] (part_block_markbad
> > +0x50/0x64) from [<c0386314>] (nandmtd2_MarkNANDBlockBad+0x48/0x5c)
> > Apr 1 13:52:32 wellsense kernel: [<c0386314>]
> > (nandmtd2_MarkNANDBlockBad+0x48/0x5c) from [<c03853cc>]
> > (yaffs_MarkBlockBad+0x1c/0x28)
> > Apr 1 13:52:32 wellsense kernel: [<c03853cc>] (yaffs_MarkBlockBad
> > +0x1c/0x28) from [<c0380208>] (yaffs_BlockBecameDirty+0x1e4/0x388)
> > Apr 1 13:52:32 wellsense kernel: [<c0380208>] (yaffs_BlockBecameDirty
> > +0x1e4/0x388) from [<c03805a0>] (yaffs_DeleteChunk+0x1f4/0x214)
> > Apr 1 13:52:32 wellsense kernel: [<c03805a0>] (yaffs_DeleteChunk
> > +0x1f4/0x214) from [<c0381af0>] (yaffs_CheckGarbageCollection
> > +0x8f8/0xb7c)
> > Apr 1 13:52:32 wellsense kernel: [<c0381af0>]
> > (yaffs_CheckGarbageCollection+0x8f8/0xb7c) from [<c03826dc>]
> > (yaffs_BackgroundGarbageCollect+0x34/0x58)
> > Apr 1 13:52:32 wellsense kernel: [<c03826dc>]
> > (yaffs_BackgroundGarbageCollect+0x34/0x58) from [<c037da10>]
> > (yaffs_BackgroundThread+0x114/0x1c4)
> > Apr 1 13:52:32 wellsense kernel: [<c037da10>] (yaffs_BackgroundThread
> > +0x114/0x1c4) from [<c026b708>] (kthread+0x78/0x80)
> > Apr 1 13:52:32 wellsense kernel: [<c026b708>] (kthread+0x78/0x80) from
> > [<c0238804>] (kernel_thread_exit+0x0/0x8)
> > Apr 1 13:52:32 wellsense kernel: Mem-info:
> > Apr 1 13:52:32 wellsense kernel: DMA per-cpu:
> > Apr 1 13:52:32 wellsense kernel: CPU 0: hi: 0, btch: 1 usd: 0
> > Apr 1 13:52:32 wellsense kernel: Normal per-cpu:
> > Apr 1 13:52:32 wellsense kernel: CPU 0: hi: 90, btch: 15 usd: 23
> > Apr 1 13:52:32 wellsense kernel: Active_anon:16294 active_file:12696
> > inactive_anon:16145
> > Apr 1 13:52:32 wellsense kernel: inactive_file:13013 unevictable:658
> > dirty:0 writeback:0 unstable:0
> > Apr 1 13:52:32 wellsense kernel: free:2366 slab:1219 mapped:3563
> > pagetables:70 bounce:0
> > Apr 1 13:52:32 wellsense kernel: DMA free:1976kB min:188kB low:232kB
> > high:280kB active_anon:3372kB inactive_anon:3500kB active_file:3476kB
> > inactive_file:2448kB unevictable:0kB present:24384kB pages_scanned:0
> > all_unreclaimable? no
> > Apr 1 13:52:32 wellsense kernel: lowmem_reserve[]: 0 229 229
> > Apr 1 13:52:32 wellsense kernel: Normal free:9948kB min:1840kB
> > low:2300kB high:2760kB active_anon:61640kB inactive_anon:61244kB
> > active_file:44796kB inactive_file:49304kB unevictable:2632kB
> > present:234688kB pages_scanned:0 all_unreclaimable? no
> > Apr 1 13:52:32 wellsense kernel: lowmem_reserve[]: 0 0 0
> > Apr 1 13:52:32 wellsense kernel: DMA: 70*4kB 20*8kB 6*16kB 5*32kB
> > 2*64kB 1*128kB 0*256kB 0*512kB 1*1024kB 0*2048kB 0*4096kB 0*8192kB
> > 0*16384kB = 1976kB
> > Apr 1 13:52:32 wellsense kernel: Normal: 986*4kB 155*8kB 57*16kB
> > 36*32kB 11*64kB 9*128kB 4*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB
> > 0*8192kB 0*16384kB = 10128kB
> > Apr 1 13:52:32 wellsense kernel: 55383 total pagecache pages
> > Apr 1 13:52:32 wellsense kernel: 0 pages in swap cache
> > Apr 1 13:52:32 wellsense kernel: Swap cache stats: add 0, delete 0,
> > find 0/0
> > Apr 1 13:52:32 wellsense kernel: Free swap = 0kB
> > Apr 1 13:52:32 wellsense kernel: Total swap = 0kB
> > Apr 1 13:52:32 wellsense kernel: 65536 pages of RAM
> > Apr 1 13:52:32 wellsense kernel: 3406 free pages
> > Apr 1 13:52:32 wellsense kernel: 2456 reserved pages
> > Apr 1 13:52:32 wellsense kernel: 985 slab pages
> > Apr 1 13:52:32 wellsense kernel: 4497 pages shared
> > Apr 1 13:52:32 wellsense kernel: 0 pages swap cached
> > Apr 1 13:52:32 wellsense kernel: nand_update_bbt: Out of memory
> > Apr 1 13:52:32 wellsense kernel: nand_erase: attempt to erase a bad
> > block at page 0x00021c00
> > Apr 1 13:52:32 wellsense kernel: yaffs: Failed to mark bad and erase
> > block 285
> > Apr 1 13:52:32 wellsense kernel: **>> Block 285 retired
> > Apr 1 13:52:32 wellsense kernel: Block 285 is in state 9 after gc,
> > should be erased
> >
> > Anyone know what this is about?
>
>
> The following:
> > Apr 1 13:52:32 wellsense kernel: nand_update_bbt: Out of memory
> > Apr 1 13:52:32 wellsense kernel: nand_erase: attempt to erase a bad
>
> tells me it is a problem in the mtd layer.
>
> Looks like yaffs still handled the problem properly though.
>
> -- Charles
>
> _______________________________________________
> yaffs mailing list
> yaffs@lists.aleph1.co.uk
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs