On Sat, 9 Sept 2023 at 17:14, Bastian Bittorf <[email protected]> wrote: > > I tried to replicate your findings, but my slow embedded OpenWRT > system (with musl libc) is so fast, that your tests always produce > 0 seconds execution time. You are talking about nofork and cpu affinity:
About the system speed, I took a comparison with my standard Ubuntu installation and the latency in accessing to /proc is a matter of fact. It depends on the kernel that every /proc access updates all the values including cpu frequency and especially for these values, it needs some time to determine the reliability of the value. This is what I understood reading documentation around, but I did not try anything particular to check/confute this. Using strace to check the timing of every operation, almost all the access to proc by busybox pidof have the same duration and no particular operation consumes a lot of time. This excludes that there is a single instruction/command that creates a bottle-neck. Therefore, I investigated the kernel debug system, deactivated it, etc. etc. and finally I took in consideration that in some "advanced" systems the /proc is slow to access while in bare-simple system it is not a problem (e.g. CPU frequency scaling does not exist at all). Aligning the max frequency with the minimum does not change anything about this aspect. If you have suggestions, you are welcome. Best regards, R- _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
