gluon-core: limit memory that may be used by fq_codel to 1MB per AP on devices with less than 48MB RAM to avoid OOM

This commit is contained in:
Christof Schulze 2017-02-15 20:30:36 +01:00
parent 6a5a7a7131
commit ec284233ea

View File

@ -0,0 +1,8 @@
#!/bin/sh
if [ "${ACTION}" = "add" ]; then
RAM=$(grep MemTotal /proc/meminfo |awk '{print $2}')
if [ "$RAM" -lt $((48*1024)) ]; then
echo "fq_memory_limit 1048576" > "/sys/kernel/debug/ieee80211/$DEVICENAME/aqm"
fi
fi