<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.kerneltrap.org"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>KernelTrap - embedded</title>
 <link>http://www.kerneltrap.org/taxonomy/term/964/0</link>
 <description></description>
 <language>en-local</language>
<item>
 <title>Signaling When Out of Memory</title>
 <link>http://www.kerneltrap.org/Linux/Signaling_When_Out_of_Memory</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;The previous 2.4 Linux kernel maintainer, Marcelo Tossati, resurrected a discussion on adding support for &lt;a href=&quot;http://kerneltrap.org/mailarchive/linux-kernel/2007/10/18/347589&quot;&gt;out of memory notifications&lt;/a&gt; to the Linux kernel.  He explained, &quot;&lt;i&gt;AIX contains the SIGDANGER signal to notify applications to free up some unused cached memory,&lt;/i&gt;&quot; then noting, &quot;&lt;i&gt;there have been a few discussions on implementing such an idea on Linux, but nothing concrete has been achieved.&lt;/i&gt;&quot;  In a request for discussion, Marcelo added, &quot;&lt;i&gt;on the kernel side Rik suggested two notification points: &#039;about to swap&#039; (for desktop scenarios) and &#039;about to OOM&#039; (for embedded-like scenarios).&lt;/i&gt;&quot;  Rik van Riel explained:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;The first threshold - &#039;we are about to swap&#039; - means the application frees memory that it can.  Eg. free()d memory that glibc has not yet given back to the kernel, or JVM running the garbage collector, or ...&lt;/p&gt;
&lt;p&gt;&quot;The second threshold - &#039;we are out of memory&#039; - means that the first approach has failed and the system needs to do something else. On an embedded system, I would expect some application to exit or maybe restart itself.&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://www.kerneltrap.org/Linux/Signaling_When_Out_of_Memory&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.kerneltrap.org/Linux/Signaling_When_Out_of_Memory#comments</comments>
 <category domain="http://www.kerneltrap.org/embedded">embedded</category>
 <category domain="http://www.kerneltrap.org/Linux">Linux</category>
 <category domain="http://www.kerneltrap.org/taxonomy/term/480">Marcelo Tosatti</category>
 <category domain="http://www.kerneltrap.org/memory">memory</category>
 <category domain="http://www.kerneltrap.org/taxonomy/term/1012">OOM</category>
 <category domain="http://www.kerneltrap.org/Rik_van_Riel">Rik van Riel</category>
 <category domain="http://www.kerneltrap.org/news/linux">Linux news</category>
 <pubDate>Fri, 19 Oct 2007 13:29:00 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">14617 at http://www.kerneltrap.org</guid>
</item>
<item>
 <title>Out of Memory Notification</title>
 <link>http://www.kerneltrap.org/Linux/Out_of_Memory_Notification</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;&quot;&lt;i&gt;Applications with dynamic input and dynamic memory usage have some issues with the current overcommitting kernel,&lt;/i&gt;&quot; &lt;a href=&quot;http://kerneltrap.org/mailarchive/linux-kernel/2007/9/28/324585&quot;&gt;Daniel Spång explained&lt;/a&gt; looking for ideas on how to best manage out of memory (OOM) situations on embedded systems with little memory and without swap.  He noted, &quot;&lt;i&gt;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.&lt;/i&gt;&quot; Daniel then briefly described four possible solutions, looking for other ideas:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;1) Turn off overcommit. Results in a waste of memory.  2) 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.  3)  Using madvise() with MADV_FREE to get the kernel to free mmaped memory, typically application caches, when the kernel needs the memory.  4) A OOM handler that the application registers with the kernel, and that the kernel executes before the OOM-killer steps in.&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://www.kerneltrap.org/Linux/Out_of_Memory_Notification&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.kerneltrap.org/Linux/Out_of_Memory_Notification#comments</comments>
 <category domain="http://www.kerneltrap.org/taxonomy/term/1013">Daniel Spång</category>
 <category domain="http://www.kerneltrap.org/embedded">embedded</category>
 <category domain="http://www.kerneltrap.org/Linux">Linux</category>
 <category domain="http://www.kerneltrap.org/memory">memory</category>
 <category domain="http://www.kerneltrap.org/taxonomy/term/1012">OOM</category>
 <category domain="http://www.kerneltrap.org/news/linux">Linux news</category>
 <pubDate>Fri, 28 Sep 2007 14:29:58 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">14476 at http://www.kerneltrap.org</guid>
</item>
<item>
 <title>Tiny Linux Redux</title>
 <link>http://www.kerneltrap.org/Linux/Tiny_Linux_Redux</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;&quot;&lt;i&gt;Recently, the CE Linux forum has been working to revive the Linux-tiny project,&lt;/i&gt;&quot; &lt;a href=&quot;http://kerneltrap.org/mailarchive/linux-kernel/2007/9/19/263900&quot;&gt;stated Tim Bird&lt;/a&gt; on the Linux Kernel mailing list, adding that Michael Opdenacker has been selected as the project&#039;s new primary maintainer.  The &lt;a href=&quot;http://elinux.org/Linux_Tiny&quot;&gt;project&#039;s website&lt;/a&gt; explains:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;The linux-tiny patchset is a series of patches against the 2.6 mainline Linux kernel to reduce its memory and disk footprint, as well as to add features to aid working on small systems. Target users are developers of embedded system and users of small or legacy machines such as 386s and handhelds.&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Andrew Morton suggested that patches should be sent to him to be merged into his -mm tree, aiming for inclusion in the mainline kernel, &quot;&lt;i&gt;seriously, putting this stuff into some private patch collection should be a complete last resort - you should only do this with patches which you (and the rest of us) agree have no hope of ever getting into mainline.&lt;/i&gt;&quot;  Michael, the project&#039;s new maintainer, agreed, &quot;&lt;i&gt;you&#039;re completely right... The patches should all aim at being included into mainline or die.&lt;/i&gt;&quot;  Tim added, &quot;&lt;i&gt;the patchkit gives a place for things to live while they are out of mainline, and still have multiple people use and work on them.  Optimally the duration of being out-of-mainline would be short, but my experience is that sometimes what an embedded developer considers reasonable to hack off the kernel is not con