serenity/Kernel
brody-qq 8812410617 Kernel/Memory: Fix redundant page faults on anonymous mmaps after fork
After a fork(), page faults on anonymous mmaps can cause a redundant
page fault to occur.

This happens because VMObjects for anonymous mmaps are initially filled
with references to the lazy_committed_page or shared_zero_page. If there
is a fork, VMObject::try_clone() is called and all pages of the VMObject
are marked as cow (via the m_cow_map).

Page faults on a zero/lazy page are handled by handle_zero_fault().
handle_zero_fault() does not update m_cow_map, so if the page was marked
cow before the fault, it will still be marked cow after the fault. This
causes a second (redundant) page fault when the CPU retries the write.

This commit removes the redundant page fault by not marking zero/lazy
pages as cow in m_cow_map.
2024-07-12 08:52:06 -04:00
..
API Kernel: Remove the AllMiceDevice class 2024-07-06 21:42:32 +02:00
Arch Kernel: Allocate all device major numbers within one known header file 2024-07-06 21:42:32 +02:00
Boot Kernel/x86: Bake the Prekernel and the Kernel into one image 2024-05-14 23:37:38 +02:00
Bus Kernel: Prevent integer overflow in USB::Hub::check_for_port_updates() 2024-05-27 17:35:42 +02:00
Devices Kernel: Remove the AllMiceDevice class 2024-07-06 21:42:32 +02:00
FileSystem Kernel/SysFS: Expose device major number allocations to userspace 2024-07-06 21:42:32 +02:00
Firmware/ACPI
Heap Kernel: Use the AK SetOnce container class in various cases 2024-04-26 23:46:23 -06:00
Interrupts
Library Kernel/Library: Move mini-stdlib functions into their own header file 2024-06-29 19:56:45 +02:00
Locking Kernel: Use the AK SetOnce container class in various cases 2024-04-26 23:46:23 -06:00
Memory Kernel/Memory: Fix redundant page faults on anonymous mmaps after fork 2024-07-12 08:52:06 -04:00
Net Kernel/net: Add tracking of dropped packets per adapter 2024-05-09 12:02:26 +02:00
Prekernel Prekernel: Move the generate_secure_seed function out of init.cpp 2024-06-29 19:56:45 +02:00
Security Kernel: Move VirtIO RNG implementation to the Security/Random directory 2024-05-14 15:42:29 -06:00
Syscalls Documentation: Fix some minor ESL grammar issues 2024-07-03 00:17:46 +02:00
Tasks Kernel: Remove the ConsoleManagement singleton 2024-07-04 22:20:35 +02:00
Time Kernel: Deduplicate HardwareTimerBase::frequency()/ticks_per_second() 2024-04-30 06:01:26 -06:00
CMakeLists.txt Kernel: Remove the AllMiceDevice class 2024-07-06 21:42:32 +02:00
Debug.h.in Kernel: Add FUSE support 2024-05-07 16:54:27 -06:00
embedmap.sh
Forward.h Kernel: Ignore dirfd if absolute path is given in VFS-related syscalls 2024-06-01 19:25:15 +02:00
generate-version-file.sh
kprintf.cpp Kernel: Remove the ConsoleManagement singleton 2024-07-04 22:20:35 +02:00
kstdio.h
KSyms.cpp Kernel: Use AK::unwind_stack_from_frame_pointer 2024-05-14 14:02:06 -06:00
KSyms.h Kernel: Use the AK SetOnce container class in various cases 2024-04-26 23:46:23 -06:00
mkmap.sh
SanCov.cpp Kernel: Use the AK SetOnce container class in various cases 2024-04-26 23:46:23 -06:00
Sections.h
UnixTypes.h