[LEDE-DEV] [PATCH v1 1/3] mac80211: make relay support depend on ATH_DEBUG

Felix Fietkau nbd at nbd.name
Fri Feb 10 09:26:29 PST 2017


On 2017-02-10 17:44, Christian Lamparter wrote:
> both ath9k and ath10k use the kernel's relay framework
> to pass spectral data to userspace. However, both drivers
> only have this option enabled if the driver's debugfs
> option is enabled as well.
> 
> In case of ath10k_*, the relayfs dependency can be moved
> to the config ATH_DEBUG symbol.
> 
> ath9k needed more work. A patch to the ath9k driver was
> added to detangle RELAY and DEBUG_FS:
> "ath9k: move RELAY and DEBUG_FS to ATH9K[_HTC]_DEBUGFS"
> <https://patchwork.kernel.org/patch/9501361/>.
> 
> NB: CONFIG_PACKAGE_MAC80211_DEBUGFS needs to be disabled to
> notice the change.
> 
> Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
> ---
> Here are some numbers for my WD Range Extender (AR7370 with a AR9300):
> For both configurations MAC80211_DEBUGFS and ATH_DEBUG is disabled.
> (if they are enabled, there should be no change). All sizes are in
> bytes. And I only test with or without the patch applied.
> 
> module                 | file size | .text size |
> ath9k_common.ko (w/o)  |     32208 |      12832 |
> ath9k_common.ko (with) |     12204 |       3456 |
> 
> Note: The kernel with the patch, doesn't need RELAY support anymore.
> Therefore it shrinks a bit as well.
> 
>                   | lzma uimage size | .text size |
> 4.4 kernel (w/o)  |          1181777 |    3004592 |
> 4.4 kernel (with) |          1179666 |    2999448 |
> 
> If anyone wants to play with it, I made a test-patch For LEDE [0].
> Just remember to disable CONFIG_PACKAGE_MAC80211_DEBUGFS and
> CONFIG_PACKAGE_ATH_DEBUG.
> 
> The main motivation was that relayfs can be very costly on the RAM
> as well (on ath10k in can eat like 4MiB per device with VM debugging
> etc...).
I think we need more fine grained control than that. The default set of
debugfs files is frequently very useful for ongoing investigation into
stability issues. Thus it makes sense to have those enabled by default
(which CONFIG_ATH_DEBUG should not be).

- Felix




More information about the Lede-dev mailing list