public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* request_firmware API exhaust memory
@ 2010-04-19 12:20 Tomas Winkler
  2010-04-19 12:35 ` Kay Sievers
  2010-04-19 14:59 ` Greg KH
  0 siblings, 2 replies; 19+ messages in thread
From: Tomas Winkler @ 2010-04-19 12:20 UTC (permalink / raw)
  To: Johannes Berg, Kay Sievers, Greg KH, David Woodhouse,
	Rafael J. Wysocki, Emmanuel Grumbach
  Cc: linux-kernel

Lately we've been developing a device that rather more extensively
used request_firmware API in load and also using pm_notifiers to load
firmware. In some stress  testing the usage will exhaust the system
memory. First we suspected there is a memory leak in the
firwmare_class but eventually what is that udevd piles up it takes
time to collect the process. We loose ~ 500K for each
request/release_firmware iteration.
After the stress the process table will will look something like shown below,

If someone with more insight can point out what part of this firmware
load has to be fixed and what is the best strategy request_firmware
API used extensively.  I believe currently only Orinoco driver uses
pm_notifies to load firmware before S3/S4 but if there are more
drivers like that it might actually create a real problem during
suspend on some small systems.

root       514  0.0  0.0  15480  1116 ?        S<s  Apr01   0:01 /sbin/udevd -d
root     28989  0.0  0.0  15476   968 ?        S<   14:07   0:00 /sbin/udevd -d
root     28995  0.0  0.0  15476   976 ?        S<   14:07   0:00 /sbin/udevd -d
root     31616  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31622  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31627  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31633  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31638  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31644  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31649  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31655  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31660  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31666  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31671  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31677  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31682  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31688  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31693  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31699  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31704  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31710  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31715  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31721  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31726  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31732  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31737  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31743  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31748  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31754  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31759  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31765  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31770  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31776  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31781  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31787  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31792  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31798  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31803  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31809  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31814  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31820  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31825  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31831  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31836  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31842  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d
root     31847  0.0  0.0  15476   916 ?        S<   14:49   0:00 /sbin/udevd -d
root     31853  0.0  0.0  15476   888 ?        S<   14:49   0:00 /sbin/udevd -d

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-04-28 13:07 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-19 12:20 request_firmware API exhaust memory Tomas Winkler
2010-04-19 12:35 ` Kay Sievers
2010-04-19 14:59 ` Greg KH
2010-04-21 22:22   ` Tomas Winkler
2010-04-25 16:37     ` Greg KH
2010-04-25 19:22       ` Tomas Winkler
2010-04-25 19:36         ` Greg KH
2010-04-25 20:09           ` Tomas Winkler
2010-04-26 10:38             ` Kay Sievers
2010-04-26 15:19               ` Kay Sievers
2010-04-26 16:59                 ` Tomas Winkler
2010-04-27  4:12                 ` Sujith Manoharan
2010-04-27 11:18                 ` Tomas Winkler
2010-04-27 11:53                   ` Tomas Winkler
2010-04-27 12:05                   ` Kay Sievers
2010-04-27 12:43                     ` David Woodhouse
2010-04-27 13:34                       ` Kay Sievers
2010-04-28  8:23                         ` Kay Sievers
2010-04-28 13:07                           ` Tomas Winkler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox