mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
Kernel/x86: Re-enable interrupts ASAP when handling page faults
As soon as we've saved CR2 (the faulting address), we can re-enable interrupt processing. This should make the kernel more responsive under heavy fault loads.
This commit is contained in:
parent
037f1ae979
commit
a84d893af8
4 changed files with 5 additions and 7 deletions
|
@ -254,8 +254,12 @@ void page_fault_handler(TrapFrame* trap)
|
|||
{
|
||||
clac();
|
||||
|
||||
auto& regs = *trap->regs;
|
||||
// NOTE: Once we've extracted the faulting address from CR2,
|
||||
// we can re-enable interrupts.
|
||||
auto fault_address = read_cr2();
|
||||
sti();
|
||||
|
||||
auto& regs = *trap->regs;
|
||||
|
||||
if constexpr (PAGE_FAULT_DEBUG) {
|
||||
u32 fault_page_directory = read_cr3();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue