From b7651ee96fc7c0b88c5de4d0cc365d5472d8c990 Mon Sep 17 00:00:00 2001 From: Christof Schulze Date: Fri, 24 Feb 2017 19:43:32 +0100 Subject: [PATCH] gluon-core: limit fq_codel memory to 1MB per AP with less than 48MB RAM (#1046) --- .../etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 package/gluon-core/files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage diff --git a/package/gluon-core/files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage b/package/gluon-core/files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage new file mode 100755 index 00000000..cf0f1740 --- /dev/null +++ b/package/gluon-core/files/etc/hotplug.d/ieee80211/01-gluon-core-codel-memusage @@ -0,0 +1,8 @@ +#!/bin/sh +if [ "${ACTION}" = "add" ]; then + + RAM=$(awk '/MemTotal/ {print $2}' /proc/meminfo) + if [ "$RAM" -lt $((48*1024)) ]; then + echo "fq_memory_limit 1048576" > "/sys/kernel/debug/ieee80211/$DEVICENAME/aqm" + fi +fi