Skip to content

Commit

Permalink
autocore: x86 change RPS/XPS handling to all CPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Jul 6, 2020
1 parent 3514418 commit 88aed29
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion config/Config-images.in
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ menu "Target Images"
config GRUB_TIMEOUT
string "Seconds to wait before booting the default entry"
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default "5"
default "0"
help
If you don't know, 5 seconds is a reasonable default.

Expand Down
2 changes: 1 addition & 1 deletion package/lean/autocore/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=autocore
PKG_VERSION:=1
PKG_RELEASE:=31
PKG_RELEASE:=33


include $(INCLUDE_DIR)/package.mk
Expand Down
14 changes: 6 additions & 8 deletions package/lean/autocore/files/autocore
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,20 @@ start()
rfc=4096
cc=$(grep -c processor /proc/cpuinfo)
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)
do
echo $cc > $fileRps
done

for fileRfc in $(ls /sys/class/net/eth*/queues/rx-*/rps_flow_cnt)
do
echo $rfc > $fileRfc
done

for fileRps in $(ls /sys/class/net/eth*/queues/tx-*/xps_cpus)
do
echo $cc > $fileRps
done


uci set network.@globals[0].packet_steering=1
uci commit network

a=$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq)
b=$(echo -n ' : ')
c=$(cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l)
Expand Down
2 changes: 1 addition & 1 deletion package/lean/autocore/files/sbin/cpuinfo
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ info()
MHz=`grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'`
#获取CPU工作频率

sensors >/dev/null
sensors 2>/dev/null

if [ $? -eq 0 ];then
a=`sensors | grep 'Core 0' | cut -c10-24`
Expand Down

0 comments on commit 88aed29

Please sign in to comment.