Kernel: Implement per cpu fast pages

Basically every fast page usage should be converted into this but I'll
do them one by one when they show up in profiles
This commit is contained in:
2026-05-20 00:16:56 +03:00
parent 376e4b4c45
commit 7704e3c5c0
3 changed files with 40 additions and 4 deletions

View File

@@ -258,7 +258,11 @@ namespace Kernel
ASSERT(index < 512);
ASSERT(s_fast_page_pt);
ASSERT(s_fast_page_lock.current_processor_has_lock());
if (index < reserved_fast_pages)
ASSERT(s_fast_page_lock.current_processor_has_lock());
else
ASSERT(Processor::get_interrupt_state() == InterruptState::Disabled);
ASSERT(!(s_fast_page_pt[index] & Flags::Present));
s_fast_page_pt[index] = paddr | Flags::ReadWrite | Flags::Present;
@@ -272,7 +276,11 @@ namespace Kernel
{
ASSERT(index < 512);
ASSERT(s_fast_page_pt);
ASSERT(s_fast_page_lock.current_processor_has_lock());
if (index < reserved_fast_pages)
ASSERT(s_fast_page_lock.current_processor_has_lock());
else
ASSERT(Processor::get_interrupt_state() == InterruptState::Disabled);
ASSERT((s_fast_page_pt[index] & Flags::Present));
s_fast_page_pt[index] = 0;