Skip to contentSkip to conversation

Hoping for a little insight

DISCUSSION Justin Wojdacki 3 participants 8 messages Oct 15, 2002 – Oct 17, 2002 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hopefully someone can lend a little insight into what I'm seeing:

I am trying to copy a largish file (well, relative to the flash size) and after a variable point in the copy, "cp" goes to sleep and never wakes up again.

My configuration:

Linux Kernel 2.4.16
MTD code as ships w/ above kernel
MIPS Architecture
ST 29W320DB Flash (4 MB)
JFFS2 File System
625000 Byte file (copy of compressed kernel)

I've noticed that a number of SIGHUP's are delivered during the copy, but they stop about the same time the process is left permanently asleep.

Any suggestions/insight/etc?

Signature · 4 lines
-------------------------------------------------
Justin Wojdacki        
[email protected]         (408) 350-5032
Communications Processors Group -- Analog Devices
#1 lore raw
Quoted 3 lines · [email protected] said:

I am trying to copy a largish file (well, relative to the flash size)
and after a variable point in the copy, "cp" goes to sleep and never wakes up again.

SysRq-T.

--
dwmw2

#2 lore raw
Quoted 10 lines · David Woodhouse
Quoted 3 lines · [email protected] said:

I am trying to copy a largish file (well, relative to the flash size)
and after a variable point in the copy, "cp" goes to sleep and never wakes up again.

SysRq-T.

--
dwmw2

Sorry, no luck getting SysRq-T to work. I think the host OS (WindowsXP) or terminal program (TeraTerm) might be swallowing it.

If I cat /proc/X/status, I see the following:

Name:   cp
State:  S (sleeping)
Tgid:   30
Pid:    30
PPid:   27
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 32
Groups:
VmSize:      392 kB
VmLck:         0 kB
VmRSS:       104 kB
VmData:       20 kB
VmStk:         4 kB
VmExe:         0 kB
VmLib:         0 kB
SigPnd: 00000000000000000000000000000000
SigBlk: 00000000000000000000000000000000
SigIgn: 00000000000000000000000000000006
SigCgt: 00000000000000000000000000000000
CapInh: 0000000000000000
CapPrm: 00000000fffffeff
CapEff: 00000000fffffeff
Signature · 4 lines
-------------------------------------------------
Justin Wojdacki        
[email protected]         (408) 350-5032
Communications Processors Group -- Analog Devices
#3 lore raw
Quoted 7 lines · Justin Wojdacki
Quoted 6 lines · David Woodhouse
Quoted 3 lines · [email protected] said:

I am trying to copy a largish file (well, relative to the flash size)
and after a variable point in the copy, "cp" goes to sleep and never wakes up again.

Quoted 7 lines
Quoted 4 lines

SysRq-T.

--
dwmw2

Sorry, no luck getting SysRq-T to work. I think the host OS (WindowsXP) or terminal program (TeraTerm) might be swallowing it.

send a serial break, followed by a t

#4 lore raw
Quoted 7 lines · Russ Dill
Quoted 4 lines

Sorry, no luck getting SysRq-T to work. I think the host OS (WindowsXP) or terminal program (TeraTerm) might be swallowing it.

send a serial break, followed by a t

Nothing. :(

Signature · 4 lines
-------------------------------------------------
Justin Wojdacki        
[email protected]         (408) 350-5032
Communications Processors Group -- Analog Devices
#5 lore raw
In reply to Russ Dill

Is this helpful?

jffs2_reserve_space_gc of 196 bytes for garbage_collect_dnode failed:
-4

Signature · 4 lines
-------------------------------------------------
Justin Wojdacki        
[email protected]         (408) 350-5032
Communications Processors Group -- Analog Devices
#6 lore raw
In reply to Justin Wojdacki

FYI for those who might be able to help:

The filesystem has ~2MB free. I'm copying a 600K file from one directory to another. The filesystem is reporting that it's running out of space to garbage collect and the write process is hanging.

Signature · 4 lines
-------------------------------------------------
Justin Wojdacki        
[email protected]         (408) 350-5032
Communications Processors Group -- Analog Devices
#7 lore raw
In reply to Justin Wojdacki

Okay, so it looks like far more data is being written to flash than should be. As an example, a 8205 byte file is occupying 15356 bytes of actual flash (based on tracking writes). It looks like data is getting repeatedly written to flash. So, if I have the pattern "ABCD", I see written to flash:

A
AB
ABC
ABCD

Additionally, I see the flash being written in blocks of 512 bytes. I have CONFIG_MTD_CFI and CONFIG_MTD_JEDEC_PROBE set in my configuration, and the following entry added to jedec_probe.c:

	{
                mfr_id: MANUFACTURER_ST,
                dev_id: M29W320DB,   
                name: "ST M29W320DB",
                DevSize: SIZE_4MiB,
                NumEraseRegions: 4,
                regions: { ERASEINFO(16*1024,1),
                           ERASEINFO(8*1024,2),
                           ERASEINFO(32*1024,1),
                           ERASEINFO(64*1024,63)
                }
	}

Is this sufficient? Or should I have added an entry to amd_flash.c instead and set CONFIG_MTD_AMDSTD? (Some devices are declared in both jedec_probe.c and amd_flash.c so I'm a little unsure about how this breaks down).

Signature · 4 lines
-------------------------------------------------
Justin Wojdacki        
[email protected]         (408) 350-5032
Communications Processors Group -- Analog Devices