Matheus
d999ab7de2
mm: fix NULL deref on vnode inactive
...
An oversight on vnode inactivation when the last reference was a dirty
page causes a NULL-deref due to VOP_RELEASE set-NULL behavior.
Use a temporary variable in this case as the backing can still be
accesed by a truncation on vnode inactive.
2026-10-08 18:42:26 -03:00
Matheus
e25008b80b
Merge pull request #36 from jvbronzeado/rewrite
...
Optimize page fault handling by caching last accessed range
2026-10-08 15:39:12 -03:00
jvbronzeado
185b33e719
mm: added page fault range caching for each mm_space_t
...
mm: added last_pagefault handling when mm_space_t is unmapped
mm: fixed styling inconsistencies, fixed last pagefault range removal
mm: fix unitialized last_pagefault member in slab data
2026-10-08 15:28:56 -03:00
Matheus
6c65a90a5f
mm: properly fork shared file mappings
...
mm_fork_context() currently maps shared chdev mappings 1:1 when forking
a range. The issue with this approach is that chdev mappings are not
guaranteed to be backed by physical memory, and thus cannot safely be
refcounted. This can lead to issues on devices with more complex buffer
lifetimes.
To allow for internal book-keeping, do not map shared chdev memory on
fork and instead allow it to go through the entire fault-in process
again.
2026-10-06 11:51:01 -03:00
Matheus
b9a5ead597
mm: add full page in flag for get physical
2026-09-15 14:45:56 -03:00
Matheus
6e5e9ecdc5
mm: add flags argument to mm_cache_get_page
2026-07-18 15:24:31 -03:00
Matheus
02ba3e3939
slab: fix smp false sharing
2026-07-17 18:06:25 -03:00
Matheus
ecd16264cb
mm: handle work around shared character device mappings on fork
2026-07-08 13:03:19 -03:00
Matheus
e18333c0ab
mm: separate path for partial page in for page locking
2026-07-08 03:53:19 -03:00
Matheus
1512b2f3c6
mm: properly implement page locking
2026-07-08 01:37:12 -03:00
Matheus
af30088c0d
mm: properly handle MM_RANGE_FLAGS_REPLACE
2026-07-07 20:20:49 -03:00
Matheus
30cdfbb63c
mm: more page pinning work
2026-07-01 21:25:27 -03:00
Matheus
bec7abc91a
mm: refactor mm.c to use snake_case
2026-07-01 15:13:30 -03:00
Matheus
239c267ed3
mm: rename vmm api to mm
2026-07-01 15:00:46 -03:00
Matheus
c650036cfe
mm: better range.c variable names
2026-07-01 13:36:49 -03:00
Matheus
48a4c1c8e8
mm: split range.c from vmm.c
2026-07-01 13:31:30 -03:00
Matheus
9c5854d645
mm: refactor cache.c to snake case
2026-07-01 12:38:15 -03:00
Matheus
d890eb5fb2
mm: vmmcache -> mm_cache
2026-07-01 12:25:18 -03:00
Matheus
4d1caa6ede
mm: refactor page.c related names to snake case
2026-07-01 12:06:30 -03:00
Matheus
6f8700e678
mm: refactor pmm -> page
2026-07-01 11:56:06 -03:00
iretq
f8ebf11003
pmm: properly initialize bootloader reclaimable entries
...
Co-authored-by: Matheus <matheusuky@gmail.com >
2026-04-25 14:20:37 -03:00
Matheus
71dd6d1125
x86-64: enable smep and smap
2026-04-23 15:29:43 -03:00
Matheus
b62c71f3c9
vmmcache: fix dirty list race
2026-04-22 19:53:58 -03:00
Matheus
dfce89c1ff
pmm: fix refcounting race
2026-04-22 19:50:17 -03:00
Matheus
b7b8e3c66d
vmm: switch out old vmmrange allocator for a slab object cache
2026-04-22 19:48:14 -03:00
Matheus
e297e6d3ae
slab: support creating slabs out of pmm
2026-04-22 19:48:14 -03:00
Matheus
e121029500
vmm: reduce number of page faults on anonymous page in
2026-04-17 20:48:45 -03:00
Matheus
4e8f925156
alloc: refactor
2026-04-01 16:54:03 -03:00
Matheus
a48edb99be
vmmcache: fix TOCTOU
2026-04-01 16:46:20 -03:00
Matheus
774ae10e99
kernel: update limine to 11 and use base revision 6
2026-04-01 16:45:42 -03:00
Matheus
bf4696fa4d
vmm: fix fork not doing exact copy
2026-03-20 21:30:53 -03:00
Matheus
e69d88c917
slab: fix some issues
2026-03-03 01:19:44 -03:00
Matheus
32e174d00c
slab: fix early boot when having lots of cpus
2026-02-17 17:00:28 -03:00
Matheus
b3d5bf5586
vmm: some work towards page locking
2026-02-12 16:25:35 -03:00
Matheus
aceaab3ddf
vmm: fix changemap
2025-12-28 15:45:11 -03:00
Matheus
70d4c75cfe
vmm: use red-black trees
2025-12-26 23:02:55 -03:00
Matheus
81f9e758dc
kernel: misc fixes
2025-12-06 18:48:51 -03:00
Matheus
438ef959fe
kernel: add python script to generate init dependency graph
2025-11-13 23:31:49 -03:00
Matheus
c9d401f488
syscalls: sysinfo
2025-11-02 21:30:24 -03:00
Matheus
d8c377f0d8
vmmcache: fix
2025-10-17 13:51:50 -03:00
Matheus
049b9c9ad6
kernel: random page cache fixes
2025-10-13 00:12:24 -03:00
Matheus
a9f093fa29
Revert "vmmcache: break down lock"
...
This reverts commit a3a51abfed .
2025-09-18 20:19:10 -03:00
Matheus
a3a51abfed
vmmcache: break down lock
2025-09-07 02:14:26 -03:00
Matheus
accad4d70a
mmu: enable global pages
2025-09-07 00:05:36 -03:00
Matheus
2fa040096c
slab: rewrite slab allocator
2025-09-04 22:55:19 -03:00
Matheus
e28b2b1f2f
alloc: add two more cache sizes
2025-09-01 21:38:26 -03:00
Matheus
c381d34e96
vmmcache: fix locking bug
2025-08-25 20:05:49 -03:00
Matheus
607566531d
kernel: rework init
2025-08-14 20:25:43 -03:00
Matheus
9bf5fb14c9
misc allocator optimisations
2025-02-15 21:47:28 -03:00
Matheus
8c42826cf1
Merge pull request #16 from Qwinci/openjdk-work
...
Add openjdk17 port
2025-01-13 11:46:23 -03:00