aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorSander Vanheule <sander@svanheule.net>2022-10-31 10:11:04 +0100
committerSander Vanheule <sander@svanheule.net>2022-11-01 09:13:11 +0100
commit75c576d4c4763785c665e3211b17868b3ed8e819 (patch)
tree7b765acad5cb156abeb3f7dbed8dbdfe6cdd7583 /target
parent3b936510720b04ec02b4e4a395aa39cdcfbc47d5 (diff)
downloadupstream-75c576d4c4763785c665e3211b17868b3ed8e819.tar.gz
upstream-75c576d4c4763785c665e3211b17868b3ed8e819.tar.bz2
upstream-75c576d4c4763785c665e3211b17868b3ed8e819.zip
realtek: mark clock source as continuous
After replacing the R4K event timer and clock source with the new Realtek Otto timer, performance for RTL839x devices was severely impacted, as reported by Hiroshi. Research by Markus showed that after commit 4657a5301eb5 ("realtek: avoid busy waiting for RTL839x PHY read/write"), the ethernet driver could only update a phy once per timer interval, which also heavily impacted boot time. On e.g. a Zyxel GS1900-48, this added around a minute to the time to fully initialise the switch. By marking the otto clocksource as continuous, the kernel enables it to be used for high resolution timers. This allows readx_poll_timeout() to sleep for less than one system timer interval, reducing system dead time. Link: https://github.com/openwrt/openwrt/issues/11117 Reported-by: INAGAKI Hiroshi <musashino.open@gmail.com> Cc: Markus Stockhausen <markus.stockhausen@gmx.de> Signed-off-by: Sander Vanheule <sander@svanheule.net> Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com> # Panasonic Switch-M48eG PN28480K Tested-by: Jan Hoffmann <jan@3e8.eu> # HPE 1920-8G, HPE 1920-48G
Diffstat (limited to 'target')
-rw-r--r--target/linux/realtek/files-5.10/drivers/clocksource/timer-rtl-otto.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/linux/realtek/files-5.10/drivers/clocksource/timer-rtl-otto.c b/target/linux/realtek/files-5.10/drivers/clocksource/timer-rtl-otto.c
index 12eed78653..14e28e50f4 100644
--- a/target/linux/realtek/files-5.10/drivers/clocksource/timer-rtl-otto.c
+++ b/target/linux/realtek/files-5.10/drivers/clocksource/timer-rtl-otto.c
@@ -227,6 +227,7 @@ struct rttm_cs rttm_cs = {
.name = "realtek_otto_timer",
.rating = 400,
.mask = CLOCKSOURCE_MASK(RTTM_BIT_COUNT),
+ .flags = CLOCK_SOURCE_IS_CONTINUOUS,
.read = rttm_read_clocksource,
.enable = rttm_enable_clocksource
}