Skip to content

rockchip: disable kernel preemption #17575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

kien-truong
Copy link
Contributor

@kien-truong kien-truong commented Jan 11, 2025

This setting is more suitable for device running OpenWRT. Most OpenWRT targets are already default to this configuration, and it has shown better performance in VPN (wireguard).

Fix: #17454

@github-actions github-actions bot added kernel pull request/issue with Linux kernel related changes target/rockchip pull request/issue for rockchip target labels Jan 11, 2025
Copy link
Contributor

@wurzerj wurzerj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good to me. Tested on my NanoPi R4S production router. I can confirm that the system is booting. It is stable since I updated (about an hour ago). I only have a 250 Mbit line which the R4S was able to fully utilize before, so I probably won't feel the performance increase. Nevertheless I ran a speed test and the device still maxes out my line. So all good.

Copy link
Member

@1715173329 1715173329 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

This setting is more suitable for device running OpenWRT.
Most OpenWRT targets are already default to this configuration,
and it has shown better performance in VPN (wireguard).

Fix: openwrt#17454

Signed-off-by: Kien Truong <duckientruong@gmail.com>
Link: openwrt#17575
Signed-off-by: Robert Marko <robimarko@gmail.com>
@robimarko robimarko force-pushed the rockchip-preempt-none branch from 561971e to 1c178f3 Compare January 12, 2025 12:22
@openwrt-bot openwrt-bot merged commit 1c178f3 into openwrt:main Jan 12, 2025
@robimarko
Copy link
Contributor

Thanks! Rebased on top of main and merged!

openwrt-bot pushed a commit that referenced this pull request Jan 12, 2025
This setting is more suitable for device running OpenWRT.
Most OpenWRT targets are already default to this configuration,
and it has shown better performance in VPN (wireguard).

Fix: #17454

Signed-off-by: Kien Truong <duckientruong@gmail.com>
Link: #17575
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 1c178f3)
@samara1531
Copy link

samara1531 commented Jan 14, 2025

"kernel": "6.6.63",
"hostname": "OpenWrt",
"system": "ARMv8 Processor rev 0",
"model": "FriendlyElec NanoPi R3S",
"board_name": "friendlyarm,nanopi-r3s",
"rootfs_type": "ext4",
"release": {
"distribution": "OpenWrt",
"version": "24.10.0-rc2",
"revision": "r28161-ea17e958b9",
"target": "rockchip/armv8",
"description": "OpenWrt 24.10.0-rc2 r28161-ea17e958b9",
"builddate": "1733226068"
}
}
Connecting to host 169.254.200.2, port 4242
[ 5] local 169.254.200.1 port 49556 connected to 169.254.200.2 port 4242
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 45.8 MBytes 383 Mbits/sec 0 423 KBytes
[ 5] 1.00-2.00 sec 43.9 MBytes 368 Mbits/sec 0 423 KBytes
[ 5] 2.00-3.00 sec 44.1 MBytes 370 Mbits/sec 0 423 KBytes
[ 5] 3.00-4.00 sec 44.1 MBytes 370 Mbits/sec 0 423 KBytes
[ 5] 4.00-5.00 sec 43.8 MBytes 367 Mbits/sec 0 423 KBytes
[ 5] 5.00-6.00 sec 44.4 MBytes 372 Mbits/sec 0 453 KBytes
[ 5] 6.00-7.00 sec 43.6 MBytes 366 Mbits/sec 0 453 KBytes
[ 5] 7.00-8.00 sec 44.5 MBytes 373 Mbits/sec 0 484 KBytes
[ 5] 8.00-9.00 sec 44.6 MBytes 374 Mbits/sec 0 484 KBytes
[ 5] 9.00-10.00 sec 44.5 MBytes 373 Mbits/sec 0 603 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 443 MBytes 372 Mbits/sec 0 sender
[ 5] 0.00-10.01 sec 442 MBytes 371 Mbits/sec receiver

r3s1

nft flush ruleset →

r3s3

@kien-truong kien-truong deleted the rockchip-preempt-none branch January 14, 2025 05:18
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Jan 18, 2025
This setting is more suitable for device running OpenWRT.
Most OpenWRT targets are already default to this configuration,
and it has shown better performance in VPN (wireguard).

Fix: openwrt#17454

Signed-off-by: Kien Truong <duckientruong@gmail.com>
Link: openwrt#17575
Signed-off-by: Robert Marko <robimarko@gmail.com>
kimocoder pushed a commit to kimocoder/openwrt that referenced this pull request Jan 20, 2025
This setting is more suitable for device running OpenWRT.
Most OpenWRT targets are already default to this configuration,
and it has shown better performance in VPN (wireguard).

Fix: openwrt#17454

Signed-off-by: Kien Truong <duckientruong@gmail.com>
Link: openwrt#17575
Signed-off-by: Robert Marko <robimarko@gmail.com>
KGeri201 pushed a commit to KGeri201/openwrt that referenced this pull request Jan 24, 2025
This setting is more suitable for device running OpenWRT.
Most OpenWRT targets are already default to this configuration,
and it has shown better performance in VPN (wireguard).

Fix: openwrt#17454

Signed-off-by: Kien Truong <duckientruong@gmail.com>
Link: openwrt#17575
Signed-off-by: Robert Marko <robimarko@gmail.com>
@chinese-maintainer
Copy link

PREEMPT provides a balance between performance and throughput, and it's optimal for routers. While PREEMPT_NONE is only provides the throughput, but gives worse performance. Don't copypaste from uncertain maintainers and revert this commit.

@chinese-maintainer
Copy link

kien-truong You have not provided any convincing arguments for disable kernel preemption. Thread #17454 based on VPN test only, and does not provide a full assessment of the potential loss productivity of all other process.

Your have only argument is that other routers have disable kernel preemption, but all devices on OpenWrt it's more than just a router and can be used to execute multiple services, from which you want to take away resources in favor of bandwidth. This is not right. Especially, I tested the firmware with it disabled kernel preemption and did not get any positive results.

The problem with poor network performance on the NanoPi devices is that OpenWrt only can use open source Realtek network drivers, which have bad implementation. This has been discussed for many years.

@issuex
Copy link

issuex commented Jan 25, 2025

PREEMPT provides a balance between performance and throughput, and it's optimal for routers. While PREEMPT_NONE is only provides the throughput, but gives worse performance. Don't copypaste from uncertain maintainers and revert this commit.

show me some benchmark that relate what you reply.

M3m3M4n pushed a commit to M3m3M4n/openwrt that referenced this pull request Feb 16, 2025
This setting is more suitable for device running OpenWRT.
Most OpenWRT targets are already default to this configuration,
and it has shown better performance in VPN (wireguard).

Fix: openwrt#17454

Signed-off-by: Kien Truong <duckientruong@gmail.com>
Link: openwrt#17575
Signed-off-by: Robert Marko <robimarko@gmail.com>
maurerr pushed a commit to maurerr/openwrt that referenced this pull request Apr 9, 2025
This setting is more suitable for device running OpenWRT.
Most OpenWRT targets are already default to this configuration,
and it has shown better performance in VPN (wireguard).

Fix: openwrt#17454

Signed-off-by: Kien Truong <duckientruong@gmail.com>
Link: openwrt#17575
Signed-off-by: Robert Marko <robimarko@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel pull request/issue with Linux kernel related changes target/rockchip pull request/issue for rockchip target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Perfomance issue on Nanopi R3S ( also on Rockchip, R2S R5C R6S .. )
9 participants