public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Out of memory management in embedded systems
@ 2007-09-28 12:55 Daniel Spång
  2007-09-28 13:09 ` linux-os (Dick Johnson)
  2007-09-29  1:59 ` Daniel Phillips
  0 siblings, 2 replies; 18+ messages in thread
From: Daniel Spång @ 2007-09-28 12:55 UTC (permalink / raw)
  To: linux-kernel

Applications with dynamic input and dynamic memory usage have some
issues with the current overcommitting kernel. A high memory usage
situation eventually results in that a process is killed by the OOM
killer. This is especially evident in swapless embedded systems with
limited memory and no swap available.

Some kind of notification to the application that the available memory
is scarce and let the application free up some memory (e.g., by
flushing caches), could be used to improve the situation and avoid the
OOM killer. I am currently not aware of any general solution to this
problem, but I have found some approaches that might (or might not)
work:

o Turn off overcommit. Results in a waste of memory.

o Nokia uses a lowmem security module to signal on predetermined
thresholds. Currently available in the -omap tree. But this requires
manual tuning of the thresholds.
http://www.linuxjournal.com/article/8502

o Using madvise() with MADV_FREE to get the kernel to free mmaped
memory, typically application caches, when the kernel needs the
memory.

o A OOM handler that the application registers with the kernel, and
that the kernel executes before the OOM-killer steps in.

Does it exist any other solutions to this problem?

Daniel

^ permalink raw reply	[flat|nested] 18+ messages in thread
[parent not found: <98nC1-6aM-9@gated-at.bofh.it>]

end of thread, other threads:[~2007-10-01 20:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-28 12:55 Out of memory management in embedded systems Daniel Spång
2007-09-28 13:09 ` linux-os (Dick Johnson)
2007-09-28 13:30   ` Daniel Spång
2007-09-28 14:04     ` linux-os (Dick Johnson)
2007-09-28 14:14       ` Daniel Spång
2007-09-28 15:16         ` linux-os (Dick Johnson)
2007-09-28 20:58           ` Daniel Spång
2007-09-29 19:48             ` Abhishek Sagar
2007-09-28 14:17       ` Rik van Riel
2007-09-28 14:36         ` Eric Dumazet
2007-09-28 15:15           ` Rik van Riel
2007-09-28 23:00             ` Nicholas Miell
2007-09-29  1:59 ` Daniel Phillips
     [not found] <98nC1-6aM-9@gated-at.bofh.it>
     [not found] ` <98nVg-6QQ-21@gated-at.bofh.it>
     [not found]   ` <98oeB-7gA-9@gated-at.bofh.it>
     [not found]     ` <98oHC-8ai-5@gated-at.bofh.it>
     [not found]       ` <98oRk-8mt-21@gated-at.bofh.it>
     [not found]         ` <98pNu-1pp-17@gated-at.bofh.it>
2007-09-29  9:15           ` Bodo Eggert
     [not found]           ` <98v6u-1h1-9@gated-at.bofh.it>
     [not found]             ` <98Qu9-170-1@gated-at.bofh.it>
2007-10-01  7:58               ` Markku Savela
2007-10-01  8:13                 ` Bernd Eckenfels
2007-10-01 16:27                   ` david
2007-10-01 20:25                     ` Robin Getz

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