Skip to contentSkip to conversation

NAND simulator

DISCUSSION Artem B. Bityutskiy 3 participants 5 messages Dec 8, 2005 – Dec 11, 2005 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hello,

I'm going to rework NAND simulator (nandsim, drivers/mtd/nand/nandsim.c) to add the following functionality:

1. Emulation of devices larger then 128MB
2. Possibility to manually specify any page size/eraseblock size/flash size.

I am going to remove flash delays emulation as it appears to be unusable. No objections?

If there are some additional offers, please, provide.

Signature · 3 lines
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.
#1 lore raw
Quoted 6 lines · Artem B. Bityutskiy

Hello,

I'm going to rework NAND simulator (nandsim, drivers/mtd/nand/nandsim.c) to add the following functionality:

1. Emulation of devices larger then 128MB

Yes please.

Quoted 2 lines

2. Possibility to manually specify any page size/eraseblock size/flash size.

Double yes please! The current way of doing things is very hard to use effectively and you need to hack quite a few places to make a useful simulation.

The current approach of simulating a physical device is probably good for testing nand.c, but it is not so great for testing file systems. If I want to test, for example, a file system on an arrangement of say 350MB then I have to go through some crazy steps like making up a fake device id and fake the chip id to give what I want. I think a more direct approach of just inserting a set of size parameters is far better.

Quoted 3 lines

I am going to remove flash delays emulation as it appears to be unusable. No objections?

Yup, I don't see much point in trying to simulate the timing. In reality nandsim is only really there for algorithmic testing and not time simulations.

Quoted 2 lines

If there are some additional offers, please, provide.

I assume you mean requests :-). If so, I have a question/request.

Can nandsim simulate storage larger than physical RAM (just swapping out) or would this need special support (eg. add some block device support? We're getting people in YAFFSland who are working with 8Gbytes of flash (and it will only get bigger!) and I expect you'd want large emulations to stress JFFS3. Being able to simulate areas up to, say, 16Gbytes for now would be a nice thing.

A way of simulating a failure (bit flip, write error) would also be handy for testing fs and ecc error handling.

Tell me if you need a guinea pig.

-- Charles

#2 lore raw
Quoted 1 line · Charles Manning

Yes please.

Uhh, will pospone this for now, will try to repair JFFS2 which doesn't work after the last month's commits. Crud! Not sure whom to blame so far.

Quoted 1 line

Can nandsim simulate storage larger than physical RAM (just swapping out) or would this need special support (eg. add some block device support? We're getting people in YAFFSland who are working with 8Gbytes of flash (and it will only get bigger!) and I expect you'd want large emulations to stress JFFS3. Being able to simulate areas up to, say, 16Gbytes for now would be a nice thing.

Well, did not plan it. But we probably may add this functionality. We may borrow it from mtd2blk ...

Quoted 1 line

A way of simulating a failure (bit flip, write error) would also be handy for testing fs and ecc error handling.

Yeah, good feature. But I'm not sure how to implement an interface for this. It is probably easier to hack nandsim and add this manually...

Signature · 3 lines
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.
#3 lore raw
Quoted 13 lines · Artem B. Bityutskiy
Quoted 1 line · Charles Manning

Yes please.

Uhh, will pospone this for now, will try to repair JFFS2 which doesn't work after the last month's commits. Crud! Not sure whom to blame so far.

Quoted 6 lines

Can nandsim simulate storage larger than physical RAM (just swapping out) or would this need special support (eg. add some block device support? We're getting people in YAFFSland who are working with 8Gbytes of flash (and it will only get bigger!) and I expect you'd want large emulations to stress JFFS3. Being able to simulate areas up to, say, 16Gbytes for now would be a nice thing.

Quoted 8 lines

Well, did not plan it. But we probably may add this functionality. We may borrow it from mtd2blk ...

Quoted 2 lines

A way of simulating a failure (bit flip, write error) would also be handy for testing fs and ecc error handling.

Yeah, good feature. But I'm not sure how to implement an interface for this. It is probably easier to hack nandsim and add this manually...

Manual hacking does work. I have done stuff like that in the past. Perhaps dynamic hacking could be done via procfs?
eg, perhaps somethiong like
echo "flip 12345 400 1" > /procfs/nandsim # flip bit 1 in byte 400, page
12345

#4 lore raw
Quoted 20 lines · Charles Manning
Quoted 19 lines · Artem B. Bityutskiy
Quoted 1 line · Charles Manning

Yes please.

Uhh, will pospone this for now, will try to repair JFFS2 which doesn't work after the last month's commits. Crud! Not sure whom to blame so far.

Quoted 6 lines

Can nandsim simulate storage larger than physical RAM (just swapping out) or would this need special support (eg. add some block device support? We're getting people in YAFFSland who are working with 8Gbytes of flash (and it will only get bigger!) and I expect you'd want large emulations to stress JFFS3. Being able to simulate areas up to, say, 16Gbytes for now would be a nice thing.

Well, did not plan it. But we probably may add this functionality. We may borrow it from mtd2blk ...

Quoted 2 lines

A way of simulating a failure (bit flip, write error) would also be handy for testing fs and ecc error handling.

Quoted 8 lines
Quoted 2 lines

Yeah, good feature. But I'm not sure how to implement an interface for this. It is probably easier to hack nandsim and add this manually...

Manual hacking does work. I have done stuff like that in the past. Perhaps dynamic hacking could be done via procfs?
eg, perhaps somethiong like
echo "flip 12345 400 1" > /procfs/nandsim # flip bit 1 in byte 400, page
12345

Sysfs would be better. Or debugfs if you really want to be "Right (tm)". But the general idea is good.

josh