This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

system short freeze

Guru 20755 points


Hello,

I am using DM814x, and I'm using rootfs in nand. I see that after I get linux prompt there are sometimes very short (1-2 seconds) freeze periodically (~60seconds, but sort of random timing).

With nfs, I did not notice this behvor, but only with rootfs in nand.
I see this freeze when:
1. pressing continously some button after getting login prompt. I also seen this with EVM.
2. toggling some led: the toggling stops whenever this freeze happens.

Is anyone familiar with it ? As I said it also happens with EVM, but the freeze in EVM is shorter.

Thanks

Ran 

  • This is quickly going out of my area of expertise, but sounds like it may be file system related.  What file system are you using in NAND flash?

  • Hi Brad,

    Thanks, you are correct suspecting jffs /nand. I still don't understand why the jffs takes so much from cpu.

    PID PPID USER STAT VSZ %VSZ %CPU COMMAND
    582 2 root RWN 0 0% 81% [jffs2_gcd_mtd5]
    510 1 root R 2260 3% 2% ./bin/remote_debug_client.out 0xbff000
    698 696 root R 2472 3% 0% top
    696 1 root S 2856 4% 0% -sh
    660 1 messageb S 2604 4% 0% /usr/bin/dbus-daemon --system
    681 1 nobody S 2212 3% 0% /usr/sbin/thttpd -d /srv/www -p 8080
    113 1 root S < 2192 3% 0% /sbin/udevd -d
    679 113 root S < 2188 3% 0% /sbin/udevd -d
    680 113 root S < 2188 3% 0% /sbin/udevd -d
    671 1 root S 2148 3% 0% /sbin/syslogd -n -O /var/log/messages
    673 1 root S 2148 3% 0% /sbin/klogd -n
    663 1 root S 2148 3% 0% /usr/sbin/telnetd
    668 1 root S 2148 3% 0% /usr/sbin/inetd
    697 1 root S 1880 3% 0% /sbin/getty 38400 tty1
    1 0 root S 1632 2% 0% init [5]
    7 2 root SW 0 0% 0% [irq/72-serial i]
    24 2 root SW 0 0% 0% [kworker/0:1]
    14 2 root SW 0 0% 0% [sync_supers]
    2 0 root SW 0 0% 0% [kthreadd]
    40 2 root SW 0 0% 0% [scsi_eh_0]

    Thanks

    Ran

  • Ran,

    This is what I have with PSP04.04.00.02 (DM814x EVM) and UBIFS on NAND:

    em: 14320K used, 187616K free, 0K shrd, 0K buff, 4484K cached
    CPU:   0% usr   0% sys   0% nic 100% idle   0% io   0% irq   0% sirq
    Load average: 0.03 0.01 0.01 1/61 1287
      PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
     1243     1 messageb S     3324   2%   0% /usr/bin/dbus-daemon --system
     1285  1283 root     R     3128   2%   0% top
     1283  1280 root     S     3128   2%   0% -sh
     1255     1 root     S     3000   1%   0% /sbin/syslogd -n -C64 -m 20
     1203     1 root     S     2940   1%   0% udhcpc -R -b -p /var/run/udhcpc.eth0.p
     1257     1 root     S     2936   1%   0% /sbin/klogd -n
     1248     1 root     S     2936   1%   0% /usr/sbin/telnetd
     1280     1 root     S     2516   1%   0% login -- root      
     1264     1 root     S     2172   1%   0% /usr/sbin/thttpd -d /srv/www -p 8080 -
     1281     1 root     S     1968   1%   0% /sbin/getty 38400 tty1
       87     1 root     S <   1956   1%   0% /sbin/udevd -d
        1     0 root     S     1708   1%   0% init [5]   
        5     2 root     SW       0   0%   0% [kworker/u:0]
        2     0 root     SW       0   0%   0% [kthreadd]
       47     2 root     SW       0   0%   0% [mtdblock8]
       50     2 root     SW       0   0%   0% [ubi_bgt0d]
       24     2 root     SW       0   0%   0% [kworker/0:1]
       59     2 root     SW       0   0%   0% [ubifs_bgt0_0]
        3     2 root     SW       0   0%   0% [ksoftirqd/0]
        4     2 root     SW       0   0%   0% [kworker/0:0]

    I see that UBIFS is recommended over JFFS2:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_04.04.00.01_Release_Notes#Read_This_First

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_FAQ#What_File_System_should_I_use_with_8-bit_BCH_ECC_scheme.3F

    Regards,
    Pavel

  • Thanks Pavel,

    We will probably move to ubi if that's the jffs driver behavior.
    By the way, the "top" screen I've copy-paste is only a snapshot, it is not constant 80% cpu, but changes up and down even near ~0%.

    Thanks

    Ran

  • Hi,

    Moving to ubifs solved the freeze and mtd errors issue.

    Thanks,

    Ran