Re: [Yaffs] yaffs2 block retirement issue

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] yaffs2 block retirement issue
On Tuesday 18 January 2011 22:36:40 Boaz Ben-David wrote:
> To sum it up, my controller (iMX353) uses HW ECC by default, and I am
> using MLC nand with 4k page and 218B oob.
> My question is, is it at all possible to make this work with YAFFS using
> oob tags (as opposed to inband-tags that work) or am I not in the right
> direction.


You need at least 16 bytes of unused OOB to store tags (this could be reduced
to approx 12 bytes or so with some effort). If there is less than that then
you will need to use inband tags.

> YAFFS gives very good performance using the inband-tags option on our
> device, the only issue is that the partition I am using it on is of
> 1.6GB size and when recovering from an unclean shutdown with the
> partition having about 600MB on it, it takes 2:30 minutes to mount
> and thats far too long.
>
> So again, I apologize for asking this again and again but I haven't
> found any information confirming/dis-confirming that I can make HW ECC
> and oob
> tags work on our MLC nand.


It is not so much a matter of HW or SW ECC, but how much space is unused.
Some HW ECC schemes will leave enough unused OOB for tags and some will not.

>
> Thanks,
>
> Boaz.
>
> On Mon, 2011-01-17 at 23:50 +0200, Boaz Ben-David wrote:
> > From looking at the ecclayout on mxc_nd2.c there are only 4 bytes in the
> > oobfree member. How many bytes does yaffs need to store it's tags? Also,
> > the imx35 uses hw ecc, I've read that mlc nand+hw ecc usually means one
> > cannot really use the oob for anything else, is that true?
> >
> > Boaz Ben-David <> wrote:
> >
> >
> > I'm using freescale's iMX353 and the nand is Samsung 2GB MLC 4k page with
> > 218 bytes oob. I was somehow under the impression that writing to the oob
> > area in MLC nand is problematic and thats why I tried using the inband
> > tags option. Isn't it?
> >
> > Charles Manning <> wrote:
> >
> > On Friday 14 January 2011 10:59:03 Ross Younger wrote:
> > > On 13/01/11 17:35, Boaz Ben-David wrote:
> > > > Well, thanks for everyone for their support.
> > > > It turns out that all I had to do is mount the partitions with the -o
> > > > inband-tags flag for YAFFS2 to work correctly on my NAND.
> > >
> > > Good to hear you've got it working. However, inband tags reduce both
> > > the storage capacity of the NAND[0] and the performance you can
> > > achieve[1]. I would recommend regular - out-of-band - tags if possible.
> > >
> > > [0] by the size of the packed tags struct (16 bytes) per page; about
> > > 0.8% of a device with 2k pages.
> > >
> > > [1] in cases where YAFFS wants to read only the tags of a page, inband
> > > mode has to read in the entire page and throw away all but the last 16
> > > bytes. This adds up fast when mounting following an unclean shutdown,
> > > when YAFFS has to scan the entire NAND.
> >
> > Yes, use out of band tags if you can. Inband tags will generally work
> > even if the mtd driver's oob handling is broken so you're sidestepping
> > the issue rather than fixing it.
> >
> > What NAND and NAND controller are you using?
> >
> > -- CHarles
> >
> > _______________________________________________
> > yaffs mailing list
> >
> > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>
> _______________________________________________
> yaffs mailing list
>
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs