jffs2 with sync burst mode
Actually I tried to debug, what happens in, before and after memcpy() in fs/jffs2/scan.c line 773 (actual cvs) located in jffs2_scan_dirent_node(), as I suspect some issues with dcache. Therefore I copied memcpy() out of arch/arm/boot/compressed/misc.c (why is it _there?) above jffs2_scan_dirent_node() to memcpykgk().
The "Name CRC failed on node at ..." is away. I populated the root-fs on the system with "cp -a -r" over nfs and rebooted with this as root-fs. No problems. But mounting takes ages :)
Whats next? :D
Konsti
Signature · 2 lines
GPG KeyID EF62FCEF Fingerprint: 13C9 B16B 9844 EC15 CC2E A080 1E69 3FDA EF62 FCEF
Quoted 1 line · Konstantin Kletschke
The "Name CRC failed on node at ..." is away. I populated the root-fs
Good.
Quoted 1 line
root-fs. No problems. But mounting takes ages :)
How much time does "ages" mean ?
Do you stand that it was faster before?
How large is your flash?
Do you have directories with huge files number in it (say, ~ 10000)?
Quoted 1 line
Whats next? :D
Profiling might help.
Try to put fewver files to your flash and test how quck is it mounted.
P.S. :
Quoted 1 line
I erased
/dev/mtdblock3with bootloader and
If you erase your flash with flash_eraseall -j it might work a bit faster.
Q: What's -j ?
A: This means that flash_eraseall ought to write special node called cleanmarker at the beginning of each block.
Q: Why is this better then to erase using my bootloader?
A: your bootloader probably doesn't write cleanmarkers.
Q: What happens if there are no cleanmarkers?
A: Nothing critical. JFFS2 will just re-erase such blocks and put cleanmarkers itself. This is just time wasting.
Q: Why does JFFS2 re-erase blocks which have no cleanmarkers but contain all FF (i.e., are erased)?
A: Because it was observed that if the power loss occurs when block is almost completely erased, there might be "unstable" bits in it. I.e., they are read sometimes as "1" and sometimes as "0" (This effect is described in David Woodhouse's page). Cleanmarker does guarantee that the block was successfully erased. All FFs don't.
Q: Does this affect mount time?
A: It might, but I guess not very much. The difference is that if there is clean marker at the beginning of the block, JFFS2 quickly detects that it is free. Otherwise, JFFS2 scans it trying to find some data, thus, wasting time.
P.P.S:
JFFS2 has problems with mount time but it should be noticable when you work with relatively large partitions, which isn't very typical for NOR.
If you are sure that the problem is not your slow flash driver, you might try Ferenc's "summary" patch.
Signature · 3 lines
Best Regards, Artem B. Bityuckiy, St.-Petersburg, Russia.
Am 2005-03-11 14:15 +0300 schrieb Artem B. Bityuckiy:
Quoted 3 lines
Quoted 1 line · Konstantin Kletschke
The "Name CRC failed on node at ..." is away. I populated the root-fs
Good.
But is moving the memcpy function a valid fix? There must be something really wrong which should be fixed :/ DCache corruption i.e. missing invalidating at the right time?
Quoted 4 lines
Quoted 2 lines
root-fs. No problems. But mounting takes ages :)
How much time does "ages" mean ?
Do you stand that it was faster before?
Sorry, my apologies! CONFIG_MTD_DEBUG_VERBOSE was on 2, on 0 I get reasonable mount time again, I am very sorry for misleading you!
Quoted 1 line
How large is your flash?
16MB, the root-fs is 5MB...
Quoted 1 line
Do you have directories with huge files number in it (say, ~ 10000)?
No.
Quoted 5 lines
A: This means that
flash_eraseallought to write special node called cleanmarker at the beginning of each block.If you are sure that the problem is not your slow flash driver, you might try Ferenc's "summary" patch.
But if I understood correct the not created-cleanmarkers-by-bootloader problem is "solved" on second boot? I see this here also, the 1st mount takes ages, the following are fast.
Regards, sorry, Konstantin
Signature · 2 lines
GPG KeyID EF62FCEF Fingerprint: 13C9 B16B 9844 EC15 CC2E A080 1E69 3FDA EF62 FCEF
Quoted 3 lines · Konstantin Kletschke
But is moving the memcpy function a valid fix? There must be something really wrong which should be fixed :/ DCache corruption i.e. missing invalidating at the right time?
Err, how can ti be valid? Do you see any problem in JFFS2 itself?
AFAIU, you have problems in layers which are bellow JFFS2. JFFS2 itself is correct. Your fix in JFFS2 is not actually fix, you have just hidden your problem, right?
Unfortunately, I can't help you with your Dcache problems. In fact, I have very limited NOR experience for now, and I might help if you find bugs in JFFS2, not in underlying drivers. May be anybody else...
Quoted 3 lines
But if I understood correct the not created-cleanmarkers-by-bootloader problem is "solved" on second boot? I see this here also, the 1st mount takes ages, the following are fast.
This depends on how long have you used JFFS2 after the first mount. Blocks aren't erased immediately on mount. Instead, this work is done later. So, *some* blocks *might* stay not re-erased.
Signature · 3 lines
Best Regards, Artem B. Bityuckiy, St.-Petersburg, Russia.
Am 2005-03-11 11:44 +0100 schrieb Konstantin Kletschke:
Quoted 5 lines
Actually I tried to debug, what happens in, before and after
memcpy()infs/jffs2/scan.cline 773 (actual cvs) located injffs2_scan_dirent_node(), as I suspect some issues with dcache. Therefore I copiedmemcpy()out ofarch/arm/boot/compressed/misc.c(why is it_there?) abovejffs2_scan_dirent_node()tomemcpykgk().
No I am puzzled.
I think I replaced arch/arm/lib/memcpy.S with
static inline __ptr_t memcpykgk(__ptr_t __dest, __const __ptr_t __src,
size_t __n)
out of arch/arm/boot/compressed/misc.c by accident, though it works now.
The inline helps probably. So, is it correct memcpy() in lib/string.c and out of arch/arm/boot/compressed/misc.c are NOT used in general arm code?
Konsti
Signature · 2 lines
GPG KeyID EF62FCEF Fingerprint: 13C9 B16B 9844 EC15 CC2E A080 1E69 3FDA EF62 FCEF