mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
Make page_in_from_vnode 2x faster.
...by adding a new class called Ext2Inode that inherits CoreInode. The idea is that a vnode will wrap a CoreInode rather than InodeIdentifier. Each CoreInode subclass can keep whatever caches they like. Right now, Ext2Inode caches the list of block indices since it can be very expensive to retrieve.
This commit is contained in:
parent
97c799576a
commit
10c470e95f
Notes:
sideshowbarker
2024-07-19 16:10:46 +09:00
Author: https://github.com/awesomekling
Commit: 10c470e95f
12 changed files with 177 additions and 152 deletions
|
@ -293,9 +293,10 @@ bool MemoryManager::page_in_from_vnode(PageDirectory& page_directory, Region& re
|
|||
dbgprintf("MM: page_in_from_vnode ready to read from vnode, will write to L%x!\n", dest_ptr);
|
||||
#endif
|
||||
sti(); // Oh god here we go...
|
||||
auto nread = vnode.fileSystem()->readInodeBytes(vnode.inode, vmo.vnode_offset() + ((region.first_page_index() + page_index_in_region) * PAGE_SIZE), PAGE_SIZE, dest_ptr, nullptr);
|
||||
ASSERT(vnode.core_inode());
|
||||
auto nread = vnode.core_inode()->read_bytes(vmo.vnode_offset() + ((region.first_page_index() + page_index_in_region) * PAGE_SIZE), PAGE_SIZE, dest_ptr, nullptr);
|
||||
if (nread < 0) {
|
||||
kprintf("MM: page_in_form_vnode had error (%d) while reading!\n", nread);
|
||||
kprintf("MM: page_in_from_vnode had error (%d) while reading!\n", nread);
|
||||
return false;
|
||||
}
|
||||
if (nread < PAGE_SIZE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue