<div class="gmail_quote">2011/3/3 Rafał Miłecki <span dir="ltr">&lt;<a href="mailto:zajec5@gmail.com">zajec5@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

W dniu 2 marca 2011 13:14 użytkownik chris@martin.cc &lt;chris@martin.cc&gt; napisał:<br>
<div><div></div><div class="h5">&gt; 2011/3/2 Rafał Miłecki &lt;<a href="mailto:zajec5@gmail.com">zajec5@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; W dniu 2 marca 2011 04:30 użytkownik chris@martin.cc &lt;chris@martin.cc&gt; napisał:<br>
&gt;&gt; &gt; 2011/3/2 chris@martin.cc &lt;chris@martin.cc&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; As one of the people why reported some of these issues, I am going to take it upon my self to<br>
&gt;&gt; &gt;&gt; test the current b43 firmware with an ASUS WL500pv2.  This uses the Broadcom 5354 SoC and &gt; has a LP-PHY with Both the stable(4.150.10.5) and experimental (4.178.10.4) firmware.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; OK.  I managed that faster that I expected<br>
&gt;&gt; &gt; I tested the latest (fresh checkout) of OpenWrt backfire 10.03<br>
&gt;&gt; &gt; I can confirm that when using the broadcom 5354 SoC (LP-PHY) that the<br>
&gt;&gt; &gt; experimental  (4.178.10.4) firmware. causes &quot;oom&quot; errors.<br>
&gt;&gt; &gt; I repeated tests with both stable and experimental with the same<br>
&gt;&gt; &gt; configuration and the<br>
&gt;&gt; &gt; experimental version always caused &quot;oom&quot;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; happy to test anything else as needed.  I currently have the stable<br>
&gt;&gt; &gt; version under a load test<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The following is the first &quot;iteration&quot; of the log - as up can see the<br>
&gt;&gt; &gt; firmware is loaded.<br>
&gt;&gt; &gt; The radio interface is added to the bridge and  moved to the<br>
&gt;&gt; &gt; forwarding state, then POW.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)<br>
&gt;&gt; &gt; b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)<br>
&gt;&gt; &gt; device wlan0 entered promiscuous mode<br>
&gt;&gt; &gt; br-lan: port 2(wlan0) entering forwarding state<br>
&gt;&gt; &gt; hotplug2 invoked oom-killer: gfp_mask=0x80d0, order=0, oom_adj=0<br>
&gt;&gt;<br>
&gt;&gt; Thanks for your tests!<br>
&gt;&gt;<br>
&gt;&gt; I really need some help now. Does anyone have idea how changing<br>
&gt;&gt; firmware can cause out of memory on host? I try to imagine some<br>
&gt;&gt; reasons...<br>
&gt;&gt; 1) We detect some problem with hw/fw (correctly or not) and go into<br>
&gt;&gt; some infinity recursion<br>
&gt;&gt; 2) Newer firmware does sth differently with DMA, we allocate too much?<br>
&gt;&gt; OK, there is not even point &quot;3&quot; from me. I have no more ideas :|<br>
&gt;&gt;<br>
&gt;&gt; I could check than new vs. old firmware on my only LP-PHY, but how can<br>
&gt;&gt; I check for memory allocated by module? lsmod displays column &quot;size&quot;<br>
&gt;&gt; but I don&#39;t think it&#39;s about memory.<br>
&gt;&gt;<br>
&gt;<br>
&gt; I did look in the source and found that there where 3 locations that<br>
&gt; kmalloc() was called,<br>
&gt; I added a printk(KERN_CRIT), just before each so I could determine so<br>
&gt; that it would be displayed on the console.<br>
&gt; But I didn&#39;t get anything.  So it must be in a tight loop.  And I&#39;m<br>
&gt; pretty sure that it is triggered by a packet being sent to the radio<br>
&gt; from the bridge.<br>
&gt; I did notice that there was some debug options so I will have a look<br>
&gt; at that tomorrow.<br>
<br>
</div></div>There are many more allocs, for example: kzalloc, kmalloc. Could you<br>
put print before them as well?<br></blockquote><div><br></div><div>A bug in the compiler was discovered the other day.  It is associated with an optimisation. A patch has been created and applied to OpenWrt trunk.  I have updated everything, rebuilt the toolchain, and the firmware.  The same problem still occurs - So its not the compiler bug.</div>

<div><br></div><div>I have located all the kmalloc() and kzalloc() calls and added a printf.</div><div><br></div><div>On loading I get.</div><div><br></div><div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Compat-wireless backport release: compat-wireless-2011-01-31-19-g74d6d79</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Backport based on wireless-testing.git master-2011-02-25</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">cfg80211: Calling CRDA to update world regulatory domain</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">b43-phy0: Broadcom 5354 WLAN found (core revision 13)</font></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/main.c:4885 kzalloc 772 bytes</font></div>

<meta http-equiv="content-type" content="text/html; charset=utf-8"><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/phy_lp.c:58 kzalloc 188 bytes</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Broadcom 43xx driver loaded [ Features: PL, GPIO LED Mask: 0x000f, Firmware-ID: FW13 ]</font></div></div><div><br></div><div>When the wireless interface is configured and added to the bridge</div>

<div><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"> root@OpenWrt:/etc/config# wifi up</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Configuration file: /var/run/hostapd-phy0.conf</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">b43/main.c:2262 kzalloc 332 bytes</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/main.c:2262 kzalloc 332 bytes</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">compat-wireless-2011-02-25/drivers/net/wireless/b43/dma.c:824 kzalloc 60 bytes</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">device wlan0 entered promiscuous mode</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">br-lan: port 2(wlan0) entering forwarding state</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">br-lan: port 2(wlan0) entering forwarding state</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Using interface wlan0 with hwaddr 00:22:15:5c:e5:82 and ssid &#39;OpenWrt&#39;</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">hotplug2 invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Call Trace:</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;80009120&gt;] dump_stack+0x8/0x34</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;8005f828&gt;] dump_header.clone.13+0x4c/0x120</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;8005fa50&gt;] oom_kill_process.clone.15+0x5c/0x2b4</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;800601f8&gt;] out_of_memory+0x2d4/0x364</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;80064074&gt;] __alloc_pages_nodemask+0x45c/0x570</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;80066a44&gt;] __do_page_cache_readahead+0xd4/0x29c</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;80066fd8&gt;] ra_submit+0x28/0x34</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;8005ccec&gt;] filemap_fault+0x280/0x508</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;800775d0&gt;] __do_fault+0x70/0x6e8</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;8007b198&gt;] handle_mm_fault+0x3b0/0x7ec</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;80016a00&gt;] do_page_fault+0x100/0x2e0</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[&lt;80001820&gt;] ret_from_exception+0x0/0x24</font></div>

<div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">I notice that the first time the interface is brought up that there is an extra kzalloc() for 332 bytes, but this may be a side effect of different commands/configuration being issued against the device.</div>

<div><br clear="all">----------------------------------------------------------<br>Chris Martin<br>m: +61 419 812 371<br>----------------------------------------------------------<br><br></div></div>