Module Name: src Committed By: rin Date: Thu Jan 9 06:55:25 UTC 2025
Modified Files: src/sys/arch/arm/cortex: gtmr.c Log Message: gtmr_delay: Put SPINLOCK_BACKOFF_HOOK in busy loop It is expanded as a `yield` instruction for aarch64. This slightly improves peak performance for some drivers on MP environments, as tested by msaitoh@ (thanks!). XXX This is what OpenBSD does, while FreeBSD just busy-spins. However, unfortunately, benefits from `yield` should be limited, as we still read count register quite frequently. For long-duration delays, Linux uses `wfit` and `wfet` insns if provided, and falls back to `wfe` otherwise: https://github.com/torvalds/linux/blob/master/arch/arm64/lib/delay.c#L26-L51 Event streams should be configured for this purpose. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/arch/arm/cortex/gtmr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.