CLEANMARKER question
Quoted 10 lines
Quoted 2 lines · [email protected] said:
OK, I suspected that much. So after a CLEANMARKER there can be a
NODETYPE_INODEor aNODETYPE_DIRENT?Or indeed any other type of node, when new ones get invented - yes.
Quoted 1 line
Why do you do 2
scan_empty()calls inscan_eraseblock()?Consider it loop unrolling.
Quoted 7 lines
Quoted 4 lines
Well, sofar I have only identified one improvement. One could add an
isempty()function in the mtd layer. That would improve scaning for empy flash so that you dont have tomtd->read()into a buffer and then check the buffer for0xffffffff. How does that sound?Sounds ugly, but could be effective. Want to benchmark it to see if it's really worth it?
I did a very ugly hack to see if there was a big difference. on my FS(¨~62 MB flash partition, 31% in use) it took 12.2 sec to mount with my ugly hack and it
tackes 13.3 sec without the ugly hack.
I guess it's not worth it.
Quoted 4 lines
If there's a way to safely avoid having to check all the node CRCs on mount, that would also help.
Yes, I once commented out all crc checking in scan just to see what happened and there was a difference, but I can not remeber how much.
Quoted 3 lines
The most useful thing to do, though, would probably be to implement checkpointing.
I have seen alot of posts about it but I have no idea on how to proceed with this.
Would checkpointing still speed up mount when power is cut and then restored?
Quoted 2 lines · [email protected] said:
I have seen alot of posts about it but I have no idea on how to proceed with this.
The basic idea is to make it nice and quick for the FS code to reproduce its internal data (the jffs2_raw_node_ref lists and clean/dirty sizes) on mount without having to work it all out from scratch. Look at what the mount code does, and see how much could be avoided - then work out precisely what needs to go into the checkpoint - it'll probably end up being a tradeoff between remount speed and the size taken by the checkpoint nodes.
I wonder if we could get away with writing a node at the _end_ of each eraseblock, just listing the start addresses of the nodes contained within that block?
Quoted 2 lines
Would checkpointing still speed up mount when power is cut and then restored?
If you write a checkpoint only on a clean unmount, then no. If you do it periodically during normal operation. then yes.
--
dwmw2