Commit c8e9e128 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3e26a9fc
......@@ -1125,6 +1125,7 @@ struct BigFileMMap {
BigFile;
int fd; /* fd of file to mmap */
int nstoreblk; /* number of times storeblk called */
// XXX nremmap + check
int nmunmap; /* ----//---- munmap called */
};
typedef struct BigFileMMap BigFileMMap;
......
......@@ -59,8 +59,7 @@ static int __ram_reclaim(RAM *ram);
/* global lock which protects manipulating virtmem data structures
*
* NOTE not scalable, but this is temporary solution - as we are going to move
* memory management back into the kernel, where it is done properly. */
* NOTE not scalable. */
static pthread_mutex_t virtmem_lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
static const VirtGilHooks *virtmem_gilhooks;
......@@ -104,7 +103,7 @@ void virt_unlock()
void virt_lock_hookgil(const VirtGilHooks *gilhooks)
{
// FIXME we hit vvv assert for real because `import bigfile,
// wendelin.bigfile` import bigfile/__init__.py twice and that in turn
// wendelin.bigfile` imports bigfile/__init__.py twice and that in turn
// imports bigfile/_bigfile.so twice. However Python loads _bigfile.so DSO
// only once - oops. The bug happens in practice when running tests via
// pytest under python3.
......@@ -216,9 +215,6 @@ void fileh_close(BigFileH *fileh)
BUG_ON(page->state == PAGE_LOADING);
page_drop_memory(page);
page_del(page);
// list_del(&page->lru);
// bzero(page, sizeof(*page)); /* just in case */
// free(page);
}
BUG_ON(!list_empty(&fileh->dirty_pages));
......@@ -885,7 +881,6 @@ VMFaultResult vma_on_pagefault(VMA *vma, uintptr_t addr, int write)
page->state = max(page->state, newstate);
// XXX overlay: assert !vma->page_ismappedv[blk] XXX not ok? (retrying after virt unlock/lock)
// XXX mmap page to all vma with .mmap_overlay=1 of this fileh.
vma_mmap_page(vma, page);
/* wcfs: mmap the page to all wcfs-backed vmas. If we don't, the memory on
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment