SchOS/kernel
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz b213ab5778 schfs: do not read a block off the disk just to overwrite it
kd_write() went through bread(), so every block a write allocated was
read from the disk first and then replaced whole. That was a quarter of
the disk operations of a SchFS write. bgetblk() is bread() without the
read, as Linux's getblk() is.

1 MB on AHCI under QEMU: 2.0 -> 2.8 MB/s in 4 KB writes, 4.5 -> 5.6
MB/s in 64 KB ones. 3 MB of random data written and copied through the
cache's evictions reads back with the same md5.

The 63 KB/s seen earlier is the legacy IDE driver on QEMU's default
machine, at about 10 ms per emulated PIO write; the same disk on AHCI
(q35) is 40 times faster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
2026-10-23 11:02:44 +02:00
..
acpi fat: FAT12, FAT16 and FAT32 with long names, read and write 2026-10-23 09:33:35 +02:00
arch/x86_64 gfx: draw the console in RAM, and write it to the card write-combined 2026-10-22 23:46:58 +02:00
core dev: read /dev/zero and /dev/urandom from them, not from the keyboard 2026-10-23 09:33:08 +02:00
dev schfs: do not read a block off the disk just to overwrite it 2026-10-23 11:02:44 +02:00
drivers acpi, vga: say what the first real boot actually found 2026-10-22 23:47:17 +02:00
fs schfs: do not read a block off the disk just to overwrite it 2026-10-23 11:02:44 +02:00
net licence: SchOS is GPL-2.0-or-later, no longer Apache-2.0 2026-10-22 08:48:45 +02:00
proc storage: AHCI, GPT/MBR partitions, and a disk a PC can boot 2026-10-22 10:57:41 +02:00
sys fs: follow symlinks like Linux; Linux mknod; /proc/partitions 2026-10-23 10:50:41 +02:00
kernel.ld debugger: the kernel can be asked a question 2026-09-14 00:58:45 +02:00