From cfc9ce66d9de166451db186f925e0b62020da21d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 12 Jan 2022 21:50:16 +0100 Subject: [PATCH] Kernel: Skip unnecessary TLB flush when growing kmalloc heap When adding entirely new page table mappings, we don't need to flush the TLB since they were not present before. --- Kernel/Heap/kmalloc.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp index 5f8800acdb..43b3ecabd7 100644 --- a/Kernel/Heap/kmalloc.cpp +++ b/Kernel/Heap/kmalloc.cpp @@ -267,8 +267,6 @@ struct KmallocGlobalData { pte->set_present(true); } - MM.flush_tlb(&MM.kernel_page_directory(), new_subheap_base, new_subheap_size / PAGE_SIZE); - add_subheap(new_subheap_base.as_ptr(), new_subheap_size); return true; }