Commit Graph

578 Commits

Author SHA1 Message Date
vasilito 7586661ad1 diag(kernel): trace fd passing through pipe and syscall layers
Add error! diagnostics to pinpoint the fd-table desync hang:
- pipe.kfdwrite/kfdread: log queued/transferred fd counts
- syscall/fs.rs fdwrite_inner/call_fdread: log socket, target fds, scheme, flags
- context/context.rs bulk_add_fds/bulk_insert_fds: log counts and first_fd

These are temporary diagnostics for the boot-hang investigation.
2026-07-14 10:28:52 +09:00
vasilito 2086faecb0 rb: reapply Red Bear patches on upstream 00cfa2d2 2026-07-12 16:55:28 +03:00
Akshit Gaur 38642377f3 Separate timers 2026-07-07 06:43:41 -06:00
Ibuki Omatsu 6c3d5d28c6 refactor: Move fd allocation logic into userspace 2026-07-01 08:02:47 -06:00
Wildan M 622a4fb3cd Solve context leak when switching 2026-06-19 17:33:46 +07:00
Wildan M 101f090ef9 Fmt 2026-06-19 16:50:14 +07:00
Akshit Gaur b93260ed2d Migrating run_queue to BTreeMap 2026-06-18 10:39:33 +05:30
4lDO2 42613ddc06 WIP: simultaneous NMI-based user+kernel profiling. 2026-06-03 19:01:35 +02:00
R Aadarsh f8bc19747a Make necessary changes to the kernel in order for relibc to support posix_spawn and posix_spawnp
* `syscall::sendfd`, now, when called with a `ContextHandle::FileTable` adds the fd to the filetable removing it from the calling process's filetable

* Files can now be added to, removed from another process, and can be duplicated using `ProcScheme::kcall`

* Files of another process with the flag O_CLOEXEC can now be closed by using `kcall`
2026-06-03 15:29:02 +05:30
Wildan M 973ac667e3 Use syscall time helper functions 2026-05-30 12:29:38 +07:00
Akshit Gaur 58283f63fe EEVDF 2026-05-30 08:39:48 -06:00
bjorn3 91ab8301f2 Fix warnings after updating rustc
Couple of features got stabilized, cpuid was made safe and there is a
new lint for function item to integer casts.
2026-05-27 20:53:10 +02:00
Wildan M f70905d439 Resolve warnings 2026-05-23 00:04:34 +07:00
Wildan M 7c653c5182 Possible fix to race condition to EBADF 2026-05-15 22:46:03 +07:00
Wildan M ff11f47404 Add futex, pipe, timeout subscribers 2026-05-13 10:46:38 +07:00
Wildan M bd44956e96 Capture event stat, change stat source for contexts 2026-05-12 12:24:49 +07:00
bjorn3 3dab161d30 Copy the flags set from physmap MemoryType over on scheme mmap
Propagating flags like uncachable or writecombining is necessary both
for correctness and for performance.
2026-05-06 21:05:16 +02:00
Speedy_Lex f49c7d991a RSDP validation and fixing a few clippy lints 2026-05-05 19:35:31 +02:00
Wildan M 85c98314a9 Unwrap select_next_context result 2026-05-02 06:23:13 -06:00
Wildan M a297bfcc82 Use smallvec for memory and notify_files 2026-04-30 22:00:35 +07:00
Wildan M 1070efaec8 Solve some lock ordering 2026-04-30 21:59:19 +07:00
Wildan M 3914801f1e Speed up vector removal 2026-04-30 21:59:19 +07:00
Wildan M 00232b456c Optimize new mmap grant 2026-04-30 11:12:01 -06:00
Wildan M fb137f8001 Avoid reaccessing AddrSpace when switching 2026-04-30 11:09:59 -06:00
Wildan M 844f393ae8 Downgrade context sigcontrol to read 2026-04-29 21:48:31 +07:00
Wildan M ba28216ae8 Downgrade locks to read 2026-04-29 21:26:44 +07:00
Wildan M ab08d47aa8 Add commented out switch debug print 2026-04-29 11:21:20 +07:00
Wildan M e7ac009f31 Fix deadlock on contended switch 2026-04-29 11:21:02 +07:00
Wildan M baf329c120 Fix dead contexts clobber idle pools 2026-04-29 11:20:21 +07:00
Wildan M b3a6154445 Move dst_space_lock lower to Solve AddrSpaceWrapper lock 2026-04-27 06:50:20 -06:00
Wildan M 8dcb508413 Make AddrSpaceWrapper lock lower without solving borrow checker 2026-04-27 06:50:20 -06:00
Wildan M e9f50698dd Remove ContextRef upgrade 2026-04-26 15:37:40 +07:00
Wildan M 2df7467d13 Use weak ContextRef for run contexts 2026-04-26 12:08:24 +07:00
Wildan M ea1d915bbc Make wake up optional 2026-04-26 07:15:10 +07:00
Wildan M 0534ab6377 Replace enqueue with dedicated idle contexts 2026-04-26 06:49:55 +07:00
Wildan M de7926e05e Do not push idle context to queue 2026-04-26 06:49:54 +07:00
Wildan M 7adceb6e80 Add idle context 2026-04-26 06:49:54 +07:00
bjorn3 7827cb6c78 Unify context list again now that we have a run queue
This simplifies code and ensures that exiting a context will properly
remove it from the list of contexts.
2026-04-26 06:49:54 +07:00
Wildan M f773d3e50d don't loop from idle to kernel context 2026-04-23 16:40:12 +07:00
Wildan M 8262fa7da9 Don't account idle time 2026-04-23 16:33:15 +07:00
bjorn3 30b967022f Fix a couple of warnings 2026-04-17 20:20:16 +02:00
Akshit Gaur 976756991a Deficit Weighted Round Robin Scheduler 2026-04-17 06:52:03 -06:00
bjorn3 2405a7ebb3 Move kmain and kmain_ap to startup/mod.rs 2026-04-12 18:41:00 +02:00
bjorn3 572bb4ce1f Avoid re-exporting arch specific modules in the crate root 2026-04-12 18:25:52 +02:00
bjorn3 654ee6ca3e size_of and align_of are part of the prelude nowadays 2026-04-09 15:23:34 -06:00
bjorn3 e98e12780e Inline BorrowedHtBuf::tail 2026-04-09 15:23:34 -06:00
Speedy_Lex ee1260363c Fix many clippy lints 2026-04-08 19:40:41 +01:00
bjorn3 ab4abf63c9 Deduplicate Page and other paging related things between architectures 2026-04-03 22:15:00 +02:00
bjorn3 b805336cfc Fix a bunch of warnings 2026-04-03 22:15:00 +02:00
Wildan M d835a3d8f0 Solve all borrow checker leaving some violation 2026-04-01 08:42:18 -06:00