SchOS/kernel/fs/schfs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz bbb61c7405 schfs: cache sixteen inodes, not one
The one-entry cache lived inside schfs_file_read, so stat() never touched
it -- which is why `ls` barely moved. Moved into schfs_inode_get, where
every caller benefits, and widened to sixteen entries.

`ls` is the shape that matters: it stats every name in a directory, so a
single entry never hits and each file costs two descents, one to find the
name and one to read the inode. Sixteen keeps hitting through a directory
walk without a second reader evicting everything. Round-robin rather than
LRU: the pattern is a walk, not a working set, so the bookkeeping on every
hit would buy nothing.

Measured in the guest, TCG, against the original baseline:

  ls /bin warm   0.70s -> 0.43s
  ls /bin cold   2.80s -> 1.32s
  read 834 KB    1.73s -> 0.35s

schfs-check passes including the round-trip; bootcheck 108 [ok].

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 04:15:45 +02:00
..
btree.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
btree.h Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
kmount.c Rename Schunix to SchOS; the kernel becomes SchIFT 2026-08-09 14:09:59 +02:00
obj.c schfs: cache sixteen inodes, not one 2026-08-10 04:15:45 +02:00
objw.c schfs: cache the last inode and the last extent 2026-08-09 23:52:11 +02:00
schfs_int.h schfs: cache the last inode and the last extent 2026-08-09 23:52:11 +02:00
space.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
vfs.c schfs: read a whole block per tree descent, not half of one 2026-08-09 23:41:11 +02:00
vol.c Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00