3 Commits
Author SHA1 Message Date
Sönke Holz cef72c74c3 Kernel: Use word-sized writes in the generic memset implementation
This decreases the boot time on my x86-64 host system from 15 s to 13 s
for AArch64 QEMU TCG and 33 s to 30 s for RISC-V QEMU TCG!

I additionally measured the performance of this new implementation
with this simple benchmark:
https://gist.github.com/spholz/b06ea737b435ecc181069cf0d911faa4

Based on to this benchmark, an unroll level 8 seems like a good choice
for all tested systems.

Here are the speedups for n=0x10000:
- Raspberry Pi 5:        7.6 ( 81984 ns -> 10748 ns)
- Raspberry Pi 4:        3.3 (131197 ns -> 39704 ns)
- StarFive VisionFive 2: 5.5 (279107 ns -> 50650 ns)
- AArch64 QEMU TCG:      6.8 (374287 ns -> 54847 ns)
- RISC-V QEMU TCG:       6.7 (354195 ns -> 52615 ns)
- x86-64 QEMU KVM:       3.8 ( 32443 ns ->  8542 ns)
2025-12-01 23:02:53 +01:00
4d97bd1c61 Kernel: Use correct asm-operands in x86 memset/memcpy
Co-Authored-By: Sönke Holz <[email protected]>
Co-Authored-By: Daniel Bertalan <[email protected]>
2025-06-03 18:25:03 +02:00
Liav A 7c0540a229 Everywhere: Move global Kernel pattern code to Kernel/Library directory
This has KString, KBuffer, DoubleBuffer, KBufferBuilder, IOWindow,
UserOrKernelBuffer and ScopedCritical classes being moved to the
Kernel/Library subdirectory.

Also, move the panic and assertions handling code to that directory.
2023-06-04 21:32:34 +02:00