[#4203] Hot plug usb-mass-storage with isp1362 driver lead to lmemory leak !
Submitted By: wisdom yan
Open Date
2008-06-27 01:36:31 Close Date
2008-07-08 21:12:28
Priority:
Medium High Assignee:
Bryan Wu
Status:
Closed Fixed In Release:
N/A
Found In Release:
2008R1-RC8 Release:
Category:
Drivers Board:
Custom
Processor:
ALL Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Rejected
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
N/A
Summary: Hot plug usb-mass-storage with isp1362 driver lead to lmemory leak !
Details:
Hot plug usb-mass-storage lead to lmemory leak !
ENV : BF531+ uclinux-dist 08RC2
root:/> echo 3 > /proc/sys/vm/drop_caches
root:/> cat /proc/meminfo
MemTotal: 54640 kB
MemFree: 40360 kB
Buffers: 0 kB
Cached: 6008 kB
SwapCached: 0 kB
Active: 2036 kB
Inactive: 3972 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Slab: 2456 kB
SReclaimable: 720 kB
SUnreclaim: 1736 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 27320 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
when I plug u-disk ,
root:/> retval=0
usb 1-2.1: new full speed USB device using isp1362-hcd and address 4
udev->speed: 2,hdev->speed : 2
r=18 buf->bMaxPacketSize0=64 | <6>
<6>usb 1-2.1: configuration #1 chosen from 1 choice
USB_STATE_CONFIGURED
scsi1 : SCSI emulation for USB Mass Storage devices
scsi 1:0:0:0: Direct-Access CBM Flash Disk 5.00 PQ: 0 ANSI: 2
sd 1:0:0:0: [sda] 2061312 512-byte hardware sectors (1055 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] 2061312 512-byte hardware sectors (1055 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Assuming drive cache: write through
sda:<7>usb-storage: queuecommand called
sda1
**********res=1*********<7>usb-storage: queuecommand called
sd 1:0:0:0: [sda] Attached SCSI removable disk
sd 1:0:0:0: Attached scsi generic sg0 type 0
root:/> echo 3 > /proc/sys/vm/drop_caches
root:/> cat /proc/meminfo
MemTotal: 54640 kB
MemFree: 40220 kB
Buffers: 8 kB
Cached: 6132 kB
SwapCached: 0 kB
Active: 2120 kB
Inactive: 4020 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Slab: 2464 kB
SReclaimable: 720 kB
SUnreclaim: 1744 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 27320 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
Then , I remove my u-disk.
root:/> echo 3 > /proc/sys/vm/drop_caches
root:/> cat /proc/meminfo
MemTotal: 54640 kB
MemFree: 40272 kB
Buffers: 0 kB
Cached: 6092 kB
SwapCached: 0 kB
Active: 2120 kB
Inactive: 3972 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Slab: 2452 kB
SReclaimable: 716 kB
SUnreclaim: 1736 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 27320 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
Cached leak 6092-6008=84K
Follow-ups
--- Yi Li 2008-07-03 00:55:58
Tested on BF537-STAMP with the usb-ext card. Using the isp1362 port.
Repeatedly insert/remove a usb flash disk, I can observe "Cached:"
memory increases, without been released when the disk removed.
Not every insert/remove increases "cached" memory, but sometimes, the
"cached" memory increases by 4K.
root:/> version
kernel: Linux release 2.6.24.4-ADI-2008R2-pre-svn4518, build #70 Tue Apr 1
14:34:57 CST 2008
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-6493, build #109 Tue Apr 1 14:34:13 CST 2008
Before insert/remove usb disk:
root:/> echo 3 > /proc/sys/vm/drop_caches
root:/> cat /proc/meminfo
MemTotal: 55032 kB
MemFree: 43324 kB
Buffers: 0 kB
Cached: 7564 kB
SwapCached: 0 kB
Active: 484 kB
Inactive: 7080 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Slab: 1424 kB
SReclaimable: 800 kB
SUnreclaim: 624 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 27516 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
After insert/remove for several times:
root:/> echo 3 > /proc/sys/vm/drop_caches
root:/> cat /proc/meminfo
MemTotal: 55032 kB
MemFree: 43320 kB
Buffers: 0 kB
Cached: 7572 kB
SwapCached: 0 kB
Active: 488 kB
Inactive: 7084 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Slab: 1420 kB
SReclaimable: 804 kB
SUnreclaim: 616 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 27516 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
--- Sonic Zhang 2008-07-03 01:23:47
This bug can only be observed with isp1362 driver.
--- Yi Li 2008-07-03 02:15:25
BF548-EZKIT also has the same problem. The difference is, I have to repeatedly
insert/remove more times before I can observe "cached" memory increase
4KB.
--- Mike Frysinger 2008-07-03 08:27:57
and if you forcibly flush caches via /proc ? loading mass storage devices
usually means the VFS layer tries to probe the superblock ...
--- Yi Li 2008-07-04 06:22:06
Yes. I call "root:/> echo 3 > /proc/sys/vm/drop_caches" each
time, before checking "/proc/meminfo". "Cached" memory just
increases by 4K. It looks this block of memory cannot be dropped.
--- Yi Li 2008-07-08 22:12:27
According to Wisdom Yan, the cause of this problem is that debug log increases
each time. He would like to close this bug.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found