Kernel: Don't enable write-combine for the Bochs framebuffer device

While write-combine greatly improves performance on bare metal, QEMU
appears to perform significantly worse when enabling it.
This commit is contained in:
Tom 2022-02-17 20:50:20 -07:00 committed by Andreas Kling
parent c8aae1ac52
commit 413bc9976c
Notes: sideshowbarker 2024-07-17 18:36:39 +09:00
3 changed files with 9 additions and 2 deletions

View file

@ -59,8 +59,10 @@ ErrorOr<Memory::Region*> FramebufferDevice::mmap(Process& process, OpenFileDescr
"Framebuffer",
prot,
shared));
if (auto result = m_userspace_framebuffer_region->set_write_combine(true); result.is_error())
dbgln("FramebufferDevice: Failed to enable Write-Combine on Framebuffer: {}", result.error());
if (m_write_combine) {
if (auto result = m_userspace_framebuffer_region->set_write_combine(true); result.is_error())
dbgln("FramebufferDevice: Failed to enable Write-Combine on Framebuffer: {}", result.error());
}
return m_userspace_framebuffer_region;
}