<div class="gmail_quote">2011/3/3 Rafał Miłecki <span dir="ltr"><<a href="mailto:zajec5@gmail.com">zajec5@gmail.com</a>></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 <chris@martin.cc> napisał:<br>
<div><div></div><div class="h5">> 2011/3/2 Rafał Miłecki <<a href="mailto:zajec5@gmail.com">zajec5@gmail.com</a>><br>
>><br>
>> W dniu 2 marca 2011 04:30 użytkownik chris@martin.cc <chris@martin.cc> napisał:<br>
>> > 2011/3/2 chris@martin.cc <chris@martin.cc><br>
>> >><br>
>> >> As one of the people why reported some of these issues, I am going to take it upon my self to<br>
>> >> test the current b43 firmware with an ASUS WL500pv2. This uses the Broadcom 5354 SoC and > has a LP-PHY with Both the stable(4.150.10.5) and experimental (4.178.10.4) firmware.<br>
>> ><br>
>> > OK. I managed that faster that I expected<br>
>> > I tested the latest (fresh checkout) of OpenWrt backfire 10.03<br>
>> > I can confirm that when using the broadcom 5354 SoC (LP-PHY) that the<br>
>> > experimental (4.178.10.4) firmware. causes "oom" errors.<br>
>> > I repeated tests with both stable and experimental with the same<br>
>> > configuration and the<br>
>> > experimental version always caused "oom"<br>
>> ><br>
>> > happy to test anything else as needed. I currently have the stable<br>
>> > version under a load test<br>
>> ><br>
>> > The following is the first "iteration" of the log - as up can see the<br>
>> > firmware is loaded.<br>
>> > The radio interface is added to the bridge and moved to the<br>
>> > forwarding state, then POW.<br>
>> ><br>
>> > b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)<br>
>> > b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)<br>
>> > device wlan0 entered promiscuous mode<br>
>> > br-lan: port 2(wlan0) entering forwarding state<br>
>> > hotplug2 invoked oom-killer: gfp_mask=0x80d0, order=0, oom_adj=0<br>
>><br>
>> Thanks for your tests!<br>
>><br>
>> I really need some help now. Does anyone have idea how changing<br>
>> firmware can cause out of memory on host? I try to imagine some<br>
>> reasons...<br>
>> 1) We detect some problem with hw/fw (correctly or not) and go into<br>
>> some infinity recursion<br>
>> 2) Newer firmware does sth differently with DMA, we allocate too much?<br>
>> OK, there is not even point "3" from me. I have no more ideas :|<br>
>><br>
>> I could check than new vs. old firmware on my only LP-PHY, but how can<br>
>> I check for memory allocated by module? lsmod displays column "size"<br>
>> but I don't think it's about memory.<br>
>><br>
><br>
> I did look in the source and found that there where 3 locations that<br>
> kmalloc() was called,<br>
> I added a printk(KERN_CRIT), just before each so I could determine so<br>
> that it would be displayed on the console.<br>
> But I didn't get anything. So it must be in a tight loop. And I'm<br>
> pretty sure that it is triggered by a packet being sent to the radio<br>
> from the bridge.<br>
> I did notice that there was some debug options so I will have a look<br>
> 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="'courier new', monospace">Compat-wireless backport release: compat-wireless-2011-01-31-19-g74d6d79</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">Backport based on wireless-testing.git master-2011-02-25</font></div><div><font class="Apple-style-span" face="'courier new', monospace">cfg80211: Calling CRDA to update world regulatory domain</font></div>
<div><font class="Apple-style-span" face="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', monospace"> root@OpenWrt:/etc/config# wifi up</font></div><div><font class="Apple-style-span" face="'courier new', monospace">Configuration file: /var/run/hostapd-phy0.conf</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">b43/main.c:2262 kzalloc 332 bytes</font></div><div><font class="Apple-style-span" face="'courier new', monospace">b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)</font></div>
<div><font class="Apple-style-span" face="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', monospace">b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)</font></div>
<div><font class="Apple-style-span" face="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', monospace">device wlan0 entered promiscuous mode</font></div><div><font class="Apple-style-span" face="'courier new', monospace">br-lan: port 2(wlan0) entering forwarding state</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">br-lan: port 2(wlan0) entering forwarding state</font></div><div><font class="Apple-style-span" face="'courier new', monospace">Using interface wlan0 with hwaddr 00:22:15:5c:e5:82 and ssid 'OpenWrt'</font></div>
<div><font class="Apple-style-span" face="'courier new', 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="'courier new', monospace">Call Trace:</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">[<80009120>] dump_stack+0x8/0x34</font></div><div><font class="Apple-style-span" face="'courier new', monospace">[<8005f828>] dump_header.clone.13+0x4c/0x120</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">[<8005fa50>] oom_kill_process.clone.15+0x5c/0x2b4</font></div><div><font class="Apple-style-span" face="'courier new', monospace">[<800601f8>] out_of_memory+0x2d4/0x364</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">[<80064074>] __alloc_pages_nodemask+0x45c/0x570</font></div><div><font class="Apple-style-span" face="'courier new', monospace">[<80066a44>] __do_page_cache_readahead+0xd4/0x29c</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">[<80066fd8>] ra_submit+0x28/0x34</font></div><div><font class="Apple-style-span" face="'courier new', monospace">[<8005ccec>] filemap_fault+0x280/0x508</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">[<800775d0>] __do_fault+0x70/0x6e8</font></div><div><font class="Apple-style-span" face="'courier new', monospace">[<8007b198>] handle_mm_fault+0x3b0/0x7ec</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">[<80016a00>] do_page_fault+0x100/0x2e0</font></div><div><font class="Apple-style-span" face="'courier new', monospace">[<80001820>] 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>