autocore: x86 change RPS/XPS handling to all CPUs

This commit is contained in:
coolsnowwolf 2020-07-06 16:13:07 +08:00
parent 351441834c
commit 88aed2924e
4 changed files with 9 additions and 11 deletions

View File

@ -229,7 +229,7 @@ menu "Target Images"
config GRUB_TIMEOUT config GRUB_TIMEOUT
string "Seconds to wait before booting the default entry" string "Seconds to wait before booting the default entry"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default "5" default "0"
help help
If you don't know, 5 seconds is a reasonable default. If you don't know, 5 seconds is a reasonable default.

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=autocore PKG_NAME:=autocore
PKG_VERSION:=1 PKG_VERSION:=1
PKG_RELEASE:=31 PKG_RELEASE:=33
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk

View File

@ -8,22 +8,20 @@ start()
rfc=4096 rfc=4096
cc=$(grep -c processor /proc/cpuinfo) cc=$(grep -c processor /proc/cpuinfo)
rsfe=$(echo $cc*$rfc | bc) rsfe=$(echo $cc*$rfc | bc)
sysctl -w net.core.rps_sock_flow_entries=$rsfe sysctl -w net.core.rps_sock_flow_entries=$rsfe >/dev/null
for fileRps in $(ls /sys/class/net/eth*/queues/rx-*/rps_cpus) for fileRps in $(ls /sys/class/net/eth*/queues/rx-*/rps_cpus)
do do
echo $cc > $fileRps echo $cc > $fileRps
done done
for fileRfc in $(ls /sys/class/net/eth*/queues/rx-*/rps_flow_cnt) for fileRfc in $(ls /sys/class/net/eth*/queues/rx-*/rps_flow_cnt)
do do
echo $rfc > $fileRfc echo $rfc > $fileRfc
done done
for fileRps in $(ls /sys/class/net/eth*/queues/tx-*/xps_cpus) uci set network.@globals[0].packet_steering=1
do uci commit network
echo $cc > $fileRps
done
a=$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq) a=$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq)
b=$(echo -n ' : ') b=$(echo -n ' : ')
c=$(cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l) c=$(cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l)

View File

@ -5,7 +5,7 @@ info()
MHz=`grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'` MHz=`grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'`
#获取CPU工作频率 #获取CPU工作频率
sensors >/dev/null sensors 2>/dev/null
if [ $? -eq 0 ];then if [ $? -eq 0 ];then
a=`sensors | grep 'Core 0' | cut -c10-24` a=`sensors | grep 'Core 0' | cut -c10-24`