summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/fork.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-03 22:45:18 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-03 22:57:45 +0100
commita819eb501664163494053d58e00ebe75893d607b (patch)
treee7be8ce9efdacef659a05c3eb4a551bd39f0ad61 /Kernel/Syscalls/fork.cpp
parent8fd69e9e566ec6283d9425925a59df297fbe0b8a (diff)
downloadserenity-a819eb501664163494053d58e00ebe75893d607b.zip
Kernel: Skip TLB flushes while cloning regions in sys$fork()
Since we know for sure that the virtual memory regions in the new process being created are not being used on any CPU, there's no need to do TLB flushes for every mapped page.
Diffstat (limited to 'Kernel/Syscalls/fork.cpp')
-rw-r--r--Kernel/Syscalls/fork.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/fork.cpp b/Kernel/Syscalls/fork.cpp
index 4b462bb672..054510bbaa 100644
--- a/Kernel/Syscalls/fork.cpp
+++ b/Kernel/Syscalls/fork.cpp
@@ -89,7 +89,7 @@ KResultOr<pid_t> Process::sys$fork(RegisterState& regs)
}
auto& child_region = child->space().add_region(region_clone.release_nonnull());
- child_region.map(child->space().page_directory());
+ child_region.map(child->space().page_directory(), ShouldFlushTLB::No);
if (&region == m_master_tls_region.unsafe_ptr())
child->m_master_tls_region = child_region;