high cpu usage using nftl for DOC2000

Selwyn Tang selwyn at hectrix.com
Wed Oct 8 23:54:12 EDT 2003


On 10/08/2003 06:22 PM, David Woodhouse wrote:
>        noatime
>               Access timestamps are not updated when a file is read.
>  
> With atime enabled, every _read_ of a file or directory causes a write
> to the flash, because the 'access timestamp' is updated.
> 
> On flash, this is a Bad Thing(tm).

I now set fstab to mount it with noatime, but it doesn't help the problem.

Besides, I added a printk to each function in nftlcore.c, printing the
name of the function when it is called, eg. "mtdcore: init_mtd". Then in
boot up, I got the followings:

/**** begin ****/
mtdcore: init_mtd
mtdcore: register_mtd_user
NFTL driver: nftlcore.c $Revision: 1.94 $, nftlmount.c $Revision: 1.34 $
DiskOnChip 2000 found at address 0xD4000
Flash chip found: Manufacturer ID: 98, Chip ID: 73 (Toshiba:NAND 16MiB 3,3V)
1 flash chips found. Total DiskOnChip size: 16 MiB
mtdcore: add_mtd_device
mtd: Giving out device 0 to DiskOnChip 2000
NFTL: add_mtd for DiskOnChip 2000
NFTL: UnitSizeFactor 0x00 detected. This violates the spec but we think
we know what it means...
 nftla: nftla1
/**** end ****/

There are only three mtdcore printk messages here: init_mtd,
register_mtd_user and add_mtd_device. Then I cat'd /proc/kmsg and ls'd
/mnt/doc. nftld immediately held all my cpu time, and /proc/kmsg didn't
give me any messages.

Where should I add printk to to get more clues?

Selwyn




More information about the linux-mtd mailing list