diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-07 16:34:00 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-07 16:34:00 +0200 |
commit | cb2d572a14d24b4d61b4a55ae31f606858b59162 (patch) | |
tree | 1a30dafda3d4c61842cd0c8fbe7aef064641fbfc | |
parent | 3364da388f17fe1da1f9d3c0518e3917359159ae (diff) | |
download | serenity-cb2d572a14d24b4d61b4a55ae31f606858b59162.zip |
Kernel: Remove "allow CPU caching" flag on VMObject
This wasn't really thought-through, I was just trying anything to see
if it would make WindowServer faster. This doesn't seem to make much of
a difference either way, so let's just not do it for now.
It's easy to bring back if we think we need it in the future.
-rw-r--r-- | Kernel/VM/MemoryManager.cpp | 4 | ||||
-rw-r--r-- | Kernel/VM/VMObject.cpp | 4 | ||||
-rw-r--r-- | Kernel/VM/VMObject.h | 1 |
3 files changed, 1 insertions, 8 deletions
diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp index 19e4f65058..319baf71b1 100644 --- a/Kernel/VM/MemoryManager.cpp +++ b/Kernel/VM/MemoryManager.cpp @@ -675,8 +675,6 @@ void MemoryManager::remap_region_page(Region& region, unsigned page_index_in_reg pte.set_writable(false); else pte.set_writable(region.is_writable()); - pte.set_cache_disabled(!region.vmo().m_allow_cpu_caching); - pte.set_write_through(!region.vmo().m_allow_cpu_caching); pte.set_user_allowed(region.is_user_accessible()); region.page_directory()->flush(page_vaddr); #ifdef MM_DEBUG @@ -711,8 +709,6 @@ void MemoryManager::map_region_at_address(PageDirectory& page_directory, Region& pte.set_writable(false); else pte.set_writable(region.is_writable()); - pte.set_cache_disabled(!region.vmo().m_allow_cpu_caching); - pte.set_write_through(!region.vmo().m_allow_cpu_caching); } else { pte.set_physical_page_base(0); pte.set_present(false); diff --git a/Kernel/VM/VMObject.cpp b/Kernel/VM/VMObject.cpp index 45ef59b567..a695f18e6c 100644 --- a/Kernel/VM/VMObject.cpp +++ b/Kernel/VM/VMObject.cpp @@ -22,9 +22,7 @@ NonnullRefPtr<VMObject> VMObject::create_anonymous(size_t size) NonnullRefPtr<VMObject> VMObject::create_for_physical_range(PhysicalAddress paddr, size_t size) { size = ceil_div(size, PAGE_SIZE) * PAGE_SIZE; - auto vmo = adopt(*new VMObject(paddr, size)); - vmo->m_allow_cpu_caching = false; - return vmo; + return adopt(*new VMObject(paddr, size)); } NonnullRefPtr<VMObject> VMObject::clone() diff --git a/Kernel/VM/VMObject.h b/Kernel/VM/VMObject.h index 4bd24749cd..3bc549fd83 100644 --- a/Kernel/VM/VMObject.h +++ b/Kernel/VM/VMObject.h @@ -48,7 +48,6 @@ private: template<typename Callback> void for_each_region(Callback); - bool m_allow_cpu_caching { true }; off_t m_inode_offset { 0 }; size_t m_size { 0 }; RefPtr<Inode> m_inode; |