Re: [Yaffs] Moving Pages out from under yaffs...............…

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: hcgoffo2
CC: YAFFS ML
Subject: Re: [Yaffs] Moving Pages out from under yaffs.....................
Yaffs does not have any specific code to handle read disturb, but the
background gc (with Linux) will occasionally copy the oldest block, thus
doing a "refresh" which goes some way towards addressing read disturb.


Doing page remapping behind the scenes like this would require some code
that does something along the lines of what the garbage collection does:

- Look at the tags on each page.
- Find where that fits in
- Fix up the trees etc.


If you are rewriting the entire block and doing something like this then
you should not be changing the sequence number, for the reason I'll try to
explain below:

The sequence number is used to determine where the block fits in the time
line. If you just take an old block, copy it, and give it a new sequence
number then you will "change history". This will mess many things up. For
just one example (there are many), consider this:

In seq 5000:
- Create a file called "foo". Length is now 0.
- Write some data to the file.
In seq 5001:
- Write more data tp the file.
- Close the file, update the file header to show size = 5mbytes.
Now copy block seq 5000, renumbering it to seq 5002.

- Now block seq 5002 shows file "foo" has size 0.

If the partition is remounted and scanned, we will see the file size is 0,
so all the file data will be ignored. History has been violated.

Now garbage collection does do copying, from an old seq number to a new seq
number, but it does so very carefully so that history is preserved.


Another alternative might be to trigger gc on a block once read disturb
limits are being approached. This can be done by setting the block's
gc_prioritise bit. See yaffs_handle_chunk_error() for an example. This will
then cause the block to be garbage collected as soon as possible (ie
without violating history). This will not, however, use the fancy NAND copy
code.


Regards

Charles




On Wed, Apr 23, 2014 at 1:02 AM, <> wrote:

> All:
>
> I finally have our system up and running with yaffs2 as the file system,
> using our own in house NAND controller. But I want to speed things up by
> using some features that the hardware guys provided. One of which is
> handling movement of pages (with ECC correction) when needed. The driver
> would keep track of number of times a page is accessed and move the page if
> needed. the driver Software can say source page, destination page ( which
> would be in another erased block) then the controller will move it. But SW
> has the opportunity to update the spare area ( tag information) for the new
> copy. So I was thinking I could somehow 'fool' the yaffs code to think the
> page data is now elsewhere (Perhaps by incrementing* the sequence Number*). Any ideas, or do I need to go into some yaffs structures and update
> them. ( Which I could be doing while the data is being moved by the
> hardware).
>
> This is for handling read disturb errors, which I read yaffs does not
> handle yet.
>
>
>
>
> *Henry C Gofforth* / Pr Software Engineer / Air Transport Displays
> Software 4
> MS 131-102, Cedar Rapids, IA, USA
> Phone: 319-295-0373 / VPN: 295-0373 / Fax: 319-295-8100
> ** <>
> *www.rockwellcollins.com* <http://www.rockwellcollins.com/>
>
>
> _______________________________________________
> yaffs mailing list
>
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>
>