Commit Graph

264 Commits

Author SHA1 Message Date
Loïc Grégoire 672f04a833 add tidy script 2026-09-27 16:21:40 -04:00
Loïc Grégoire c7673dc438 ke: fix shootdown bugs 2026-09-26 13:11:20 -04:00
Loïc Grégoire 021e213fb2 ke/turnstile: make turnstiles more finely locked
Add a per-turnstile lock which is now held across propagation, instead of a
per-chain lock. This should hopefully
avoid scalability problems if many different turnstiles point to the same
bucket.
2026-09-20 01:18:02 -04:00
Loïc Grégoire 8013e84d9f ke/sched: style fixes 2026-09-20 00:24:44 -04:00
Loïc Grégoire 7d871ca75f ke/sched: fix IPL window when stealing threads.
There was a window where a thread could get stolen from a CPU but never
enqueued, since IPL doesn't stay raised the whole time, and the CPU could
therefore get preempted. Keep IPL raised across the whole operation until the
thread is enqueued.
2026-09-20 00:12:54 -04:00
Loïc Grégoire a9028e53ff ke/smr: allow invalid sequences in deferred_advance_commit
This was buggy when the race was lost and it ended up trying to commit a
deferred advance of 0, now explicitly make the magazine's sequence invalid and
do nothing in deferred_advance_commit, avoiding an integer underflow.
2026-09-19 23:03:39 -04:00
Loïc Grégoire e7655e9725 ke: fix scheduler deadlock on switching 2026-09-19 22:19:30 -04:00
Loïc Grégoire 472cecea08 ex: move vmem to ex 2026-09-16 16:59:22 -04:00
Loïc Grégoire 33ea78a7dd ke: refine turnstile comments 2026-09-16 16:46:04 -04:00
Loïc Grégoire eeadc1420a mm/vmem: add importing and rework API 2026-09-13 22:13:18 -04:00
Loïc Grégoire 5c160382cc rtl: add custom assert 2026-09-13 21:43:42 -04:00
Loïc Grégoire 084d28b829 mm/vmem: add quantum caching 2026-09-13 15:47:36 -04:00
Loïc Grégoire 0c3e885797 mm/zone: rework around import layer
This ends up being cleaner for doing qcaches
2026-09-12 19:41:06 -04:00
Loïc Grégoire 1176e97e90 mm: more aggressive reclamation 2026-09-07 20:58:25 -04:00
Loïc Grégoire b5d3c5fdb9 mm/zone: free empty slabs on drain() 2026-09-07 20:58:14 -04:00
Loïc Grégoire 5cb96ec943 loader: free the kernel loaded by limine 2026-09-07 20:57:04 -04:00
Loïc Grégoire 1f448dfb87 ke/wait: make wait_any parameter const 2026-09-07 20:10:18 -04:00
Loïc Grégoire 2e1265f384 ke/ipl: avoid too many @intFromEnum 2026-09-07 20:04:14 -04:00
Loïc Grégoire 6e8f9c375a ex: remove console 2026-09-07 20:03:15 -04:00
Loïc Grégoire 81c3021598 tests: use sin approximation instead of table 2026-09-03 21:05:32 -04:00
Loïc Grégoire bbd67d065d fbconsole -> bootvid 2026-09-03 21:05:20 -04:00
Loïc Grégoire 497e08bd7b all: standardize suffixes
ki -> kep
mi -> mmp
2026-09-02 22:20:25 -04:00
Loïc Grégoire cf58ad369e ke: freeze CPUs on panic 2026-09-02 22:17:54 -04:00
Loïc Grégoire d640053477 ke: disable stack donation for realtime threads 2026-09-02 20:37:26 -04:00
Loïc Grégoire f4e5caab44 dev/fbconsole: fix compile error 2026-08-29 20:05:05 -04:00
Loïc Grégoire 906433ca6d mm/zone: remove leftover log 2026-08-29 20:04:40 -04:00
Loïc Grégoire f205065d02 mm: initial balance manager code 2026-08-29 20:03:35 -04:00
Loïc Grégoire 8226a205a0 ke: add continuations 2026-08-29 20:03:22 -04:00
Loïc Grégoire d06351f31c mm/zone: defer free slab destruction 2026-08-20 21:59:28 -04:00
Loïc Grégoire 07b3893859 ke/sched: add pin helpers 2026-08-20 21:33:22 -04:00
Loïc Grégoire f6f20599ba ke/sched: add hard affinity cpumask 2026-08-20 21:19:50 -04:00
Loïc Grégoire 3204a5de6b ke/sched: make soft affinity tunable 2026-08-20 20:38:37 -04:00
Loïc Grégoire 36f3175a7f build: rewrite ksyms script in zig 2026-08-20 19:53:49 -04:00
Loïc Grégoire 0e48c47674 ke: move priority out of thread 2026-08-20 16:41:06 -04:00
Loïc Grégoire 157179ea27 ke/time: comment update 2026-08-19 18:04:50 -04:00
Loïc Grégoire 322714d508 amd64/tsc: reformat 2026-08-19 18:04:30 -04:00
Loïc Grégoire ee0c6aad67 ke: scheduler overhaul 2026-08-19 18:04:12 -04:00
Loïc Grégoire f78d10b62e ke/log_ring: cleanup 2026-08-09 19:23:03 -04:00
Loïc Grégoire 5cd981070e ke/sched: check for pending DPCs in idle 2026-08-09 16:44:49 -04:00
Loïc Grégoire 63cd104616 ke: optimize TLB shootdowns 2026-08-09 16:44:41 -04:00
Loïc Grégoire 52f62b8354 ke: optimize IPL operations 2026-08-07 15:41:12 -04:00
Loïc Grégoire 5bb264a9ae loader: rework kernel entry point 2026-08-07 15:40:58 -04:00
Loïc Grégoire 13375f294c ke/mutex: wrap lines 2026-08-05 17:52:17 -04:00
Loïc Grégoire bec872bc26 all: refactor coding style 2026-08-05 17:43:46 -04:00
Loïc Grégoire 2a09642f4d ke: rework kernel initialization 2026-08-05 16:10:37 -04:00
Loïc Grégoire 4aaae63349 ke: add generic IPI mechanism 2026-08-03 20:00:45 -04:00
Loïc Grégoire 312902931f ps: fix stack freeing bug
The thread could still be running on its stack whenever the stack ends
up getting reaped, which would free and reuse the stack before it
stops being used. Lock and unlock the thread to wait until it finishes
switching.
2026-08-02 21:45:47 -04:00
Loïc Grégoire e36416304b all: type-safe time units 2026-08-02 00:02:44 -04:00
Loïc Grégoire 24372a2b4e ke/wait: add wait_reason 2026-08-02 00:02:00 -04:00
Loïc Grégoire 05c7694776 ke/wait: make timeout parameter explicit 2026-08-01 22:44:22 -04:00