[OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik RB952Ui-5ac2nD?

Joe Ayers joe at ayerscasa.com
Mon Dec 9 00:42:48 EST 2019


On Sat, Dec 7, 2019 at 5:19 AM Hauke Mehrtens <hauke at hauke-m.de> wrote:
>
> On 12/6/19 7:02 PM, Ben Greear wrote:
> > On 12/6/19 9:44 AM, Joe Ayers wrote:
> >>>
> >>>
> >>>> Possibly the same symptoms don't exist on 128MB RAM devices.
> >>>
> >>> Like there is some if condition, which is doing some nasty things on 64M
> >>> devices? I admit, that I don't have ath10k-ct source code under my
> >>> pillow, but
> >>> it doesn't make much sense to me.
> >>>
> >>>> Comparable results between above and my 64MB device.   However, if the
> >>>> sleep time is extended the consumption is more
> >>>
> >>> Ok, I'll let it run overnight with 120s sleep in between.
> >>>
> >>>> I suspect this is not the intended behavior.
> >>>
> >>> No its not and it's even strange, that I'm not seeing it here if it
> >>> should
> >>> happen in the "default setup". Maybe its because:
> >>>
> >>> 1. You're using custom image (I'm using official prebuilt images)
> >>> 2. You're not providing all the steps needed to reproduce the issue
> >>> 3. I've way different hardware
> >>>
> >>> Every detail could make huge difference.
> >>>
> >>> -- ynezz
> >>
> >> On the device I am testing, it is both (2GHz) ath9k and (5GHz) ath10k.
> >>    These look to be related patches to this issue:
> >>
> >> 960-0010-ath10k-limit-htt-rx-ring-size.patch
> >> 960-0011-ath10k-limit-pci-buffer-size.patch
> >>
> >> In the v19.07.0-rc2 build for the rb-nor-flash-16M-ac ar71xx image,
> >> these patches are applied to backports-4.19.85-1, but don't seem to be
> >> applied to ath10k-ct-2019-09-09-5e8cd86f.    Should ath10k-ct have
> >> these and other patches?    The device's installed packages do include
> >> ath10k-ct (from downloads.openwrt.org installed image).
> >
> > I think that if you need the patches for upstream ath10k, then you
> > should also apply
> > the patches to ath10k-ct.
> >
> > Platforms with more memory probably do not need or benefit from those
> > patches.
> >
> > Thanks,
> > Ben
> >
> Hi,
>
> I am fine with adding these patches to ath10k-ct if they solve problems.
>
> It would be nice if a description could be added to the patches so I
> know what kind of buffers are reduced there.
>
> Will someone send a patch?
>
> Hauke
>

I'm currently testing with the following patches with openwrt-19.07 on
RB952Ui-5ac2nD (hAP ac lite).   Sorry, I know enough to be dangerous
to  provide a description.    I am seeing ~15M of RAM consumed, but
have not seen OOM kick in yet, like before.  These patches are an
improvement so far -- usable 64M device.

Joe

Index: openwrt/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch
===================================================================
--- /dev/null
+++ openwrt/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch
@@ -0,0 +1,11 @@
+--- a/ath10k-4.19/htt.h
++++ b/ath10k-4.19/htt.h
+@@ -238,7 +238,7 @@ enum htt_rx_ring_flags {
+ };
+
+ #define HTT_RX_RING_SIZE_MIN 128
+-#define HTT_RX_RING_SIZE_MAX 2048
++#define HTT_RX_RING_SIZE_MAX 512
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
Index: openwrt/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
===================================================================
--- /dev/null
+++ openwrt/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
@@ -0,0 +1,38 @@
+--- a/ath10k-4.19/pci.c
++++ b/ath10k-4.19/pci.c
+@@ -142,7 +142,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 512,
++              .dest_nentries = 128,
+               .recv_cb = ath10k_pci_htt_htc_rx_cb,
+       },
+
+@@ -151,7 +151,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 128,
++              .dest_nentries = 64,
+               .recv_cb = ath10k_pci_htc_rx_cb,
+       },
+
+@@ -178,7 +178,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 512,
+-              .dest_nentries = 512,
++              .dest_nentries = 128,
+               .recv_cb = ath10k_pci_htt_rx_cb,
+       },
+
+@@ -203,7 +203,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 128,
++              .dest_nentries = 96,
+               .recv_cb = ath10k_pci_pktlog_rx_cb,
+       },
+

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list