Commits


Improve Lenix stability and performance


disk fixes


Fix duplicate shell input delivery


Fix x86 boot and toolchain setup


Documenting yield / perf counters; fixing line.c unused var


Shitstorm ending: System now boots to shell with console/tty/pty working (intermittent ramdiskd or related disk I/O issues remain); yield storm tamed. TODO: Work more on ramdiskd/IPC


Tame IPC wait spins - stable


Diag: added `yields` to console menu to display process yields/blocks; instrumented further and made service-to-service IPC waits block instead of busy yield


IPC: Implemented mailbox blocking (instead of polling) to eliminate idle polling and try to reduce context switches; made service-to-service request tokens globally unique so responses can't be delivered to the wrong client.


Sched: reverted pause loop that was blocking input. WIP: polling-based IPC issues with sched_context_switches


Sched: Update PERF_COUNTER_SCHED_TICKS with sched_tick()


-Last commit before process accounting-


Fix: tmpfs now skips processing when a short/empty message arrives instead of treating it as a full req; task exit now treats portal revoke as best-effort... if transfer to a child succeeds we drop the handle; if transfer fails we attempt revoke but ignore owner mismatches to avoid noisy warnings when ownership changed


Fix: stack underflow indicated the 16KB kernel stacks were overflowing (blockd’s saved SP was ~45KB below the top). I’ve increased the per-task kernel stack size to 64KB by bumping SCHED_STACK_PAGES from 4 to 16


Debug: instrumentation for an unknown opcode error in ls. Fix: increase ext2 file handles to 256


Fix: build errors from last commit relating to debugging options (LENIX_DEBUG_EXIT)


Disabled automatic mailbox quotas so newly created task mailboxes no longer enable depth limits by default (prevents ENOBUFS-induced EBADF while we debug) (kernel/sched/task.c). Quota support is still available if explicitly turned on.


Fix: added per-task stdin spill buffer so partial reads pull from saved input instead of requeueing leftover bytes back into the mailbox - prevents dropped chars when mailbox is under pressure; introduced scheduler helpers to manage spill buffer and clear it on task takedown, keeping stdin attached to owning task


FIX: Kernel: add exponential backoff to portal_recv busy-wait loop; New IPC_BLOCK_BACKEND_STATUS_IDLE code; blockd: return IDLE instead of BUSY when no work pending; ramdiskd: handle IDLE status with aggressive backoff; virtio-blk: add IDLE status handling; reduced IDLE backoff from 100ms to 10ms.


Unblocking portal issue with filetest exit


Block service hardening: timeouts, validation, and adaptive back-off


Added defensive code to write_full() to detect and break out of the infinite loop if write() returns 0 (stdio); other mods while debugging file/mem I/O


Debug: Guard VFS logging behind LENIX_VFS_DEBUG


Fixed filetest failures (though it mostly hangs at end); minor fixes for initrd->rootfs debug logging


Fix: Added a spinlock to serialize all console writes