This commit is contained in:
Matheus
2024-05-25 20:35:19 -03:00
parent 3e1d79d5a5
commit 3bcc3e5585
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -262,7 +262,7 @@ int vmmcache_syncvnode(vnode_t *vnode, uintmax_t offset, size_t size) {
page_t *page = vnode->pages;
page_t *vnodedirtylist = NULL;
for (; page; page = page->vnodenext) {
if (page->offset < offset || page->offset >= top)
if (page->offset < offset || page->offset >= top || (page->offset & PAGE_FLAGS_DIRTY) == 0)
continue;
// remove from write list and add to an internal list using the write pointers
@@ -391,7 +391,7 @@ void vmmcache_init() {
memset(table, 0, TABLE_SIZE * sizeof(page_t *));
SEMAPHORE_INIT(&sync, 0);
writerthread = sched_newthread(writer, PAGE_SIZE * 4, 1, NULL, NULL);
writerthread = sched_newthread(writer, PAGE_SIZE * 16, 1, NULL, NULL);
__assert(writerthread);
sched_queue(writerthread);
vmmcache_sync();