Is realtime logging possible?
Hello,
Our product will have a slow-realtime logging component in it, and I'm trying to find out if flash will be capable of handling it.
We'll be logging about 6 bytes once a second into flash. The maximum blocking duration for a write should be 0.1 second or less.
I understand that sector erases in flash take lots of time, but it's possible to do erases in the background, so that if you organize the writes not to interfere with the erases (always different sectors) you won't have long blocking issues.
The technical details are:
CDB89712 (rev B) development board.
Flash TE28F320 B Jedec, not CFI
Will later be using C for final product, which is CFI
Kernel is 2.4.6-rmk1-rayl1, and we also have 2.4.16-rmk2 We can upgrade mtd drivers if necessary.
Thanks,
Derek Ross.
Quoted 9 lines · Derek Ross
Hello,
Our product will have a slow-realtime logging component in it, and I'm trying to find out if flash will be capable of handling it.
We'll be logging about 6 bytes once a second into flash. The maximum blocking duration for a write should be 0.1 second or less.
Does the write to flash really have to be done in the context of the realtime process?
You probably don't want to use a filesystem for this - just log to the raw flash, using the mtd chardevice and issuing MEMERASE calls manually when necessary.
Quoted 3 lines
background, so that if you organize the writes not to interfere with the erases (always different sectors) you won't have long blocking issues.
IIRC that's not implemented completely for the Intel chips atm. Our state machine thinks the whole chip is busy whenever it's erasing any part, and won't attempt to write to it. We should fix the state machine so it keeps state for each individual region of the flash.
Signature · 1 line
dwmw2
Quoted 7 lines
Quoted 3 lines
We'll be logging about 6 bytes once a second into
flash. The maximum blocking duration for a write
should be 0.1 second or less.You probably don't want to use a filesystem for this - just log to the raw flash, using the mtd chardevice and issuing MEMERASE calls manually when necessary.
Yes, our logging structure will basically be some circular buffers, so it will be easy to do that at the lower level.
However, we would still like to use the filesystem capabilities of the flash during non-"realtime" modes, like during configuration or initialization.
Is it possible for a filesystem to coexist with low-level reading, writing and erasing? Maybe by specifying in advance which sectors are forbidden to the filesystem.
Or is it "never the twain shall meet"?
Derek.
Quoted 4 lines · Derek Ross
Is it possible for a filesystem to coexist with
low-level reading, writing and erasing? Maybe by
specifying in advance which sectors are forbidden
to the filesystem.
Yes, you can partition the flash however you like. As I mentioned before, you need to check that the chip driver won't make the RT process wait for writes to happen in the filesystem partition, because it thinks the whole _chip_ is busy not just one sector.
Signature · 1 line
dwmw2
Quoted 4 lines · Derek Ross
Is it possible for a filesystem to coexist with
low-level reading, writing and erasing? Maybe by
specifying in advance which sectors are forbidden
to the filesystem.
or in other words, by partitioning the flash, which is supported by the MTD stuff.
k.