Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
c8e9e128
Commit
c8e9e128
authored
Dec 03, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3e26a9fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
bigfile/tests/test_virtmem.c
bigfile/tests/test_virtmem.c
+1
-0
bigfile/virtmem.c
bigfile/virtmem.c
+2
-7
No files found.
bigfile/tests/test_virtmem.c
View file @
c8e9e128
...
...
@@ -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
;
...
...
bigfile/virtmem.c
View file @
c8e9e128
...
...
@@ -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` import
s
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment