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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
3a82b464
Commit
3a82b464
authored
Jul 11, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b24422e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
bigfile/virtmem.c
bigfile/virtmem.c
+13
-2
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+1
-1
No files found.
bigfile/virtmem.c
View file @
3a82b464
...
...
@@ -471,8 +471,8 @@ void fileh_dirty_discard(BigFileH *fileh)
BUG_ON
(
page
->
state
!=
PAGE_DIRTY
);
fprintf
(
stderr
,
"discard p%ld
\n
"
,
page
->
f_pgoffset
);
pagemap_del
(
&
fileh
->
pagemap
,
page
->
f_pgoffset
);
page_drop_memory
(
page
);
page_del
(
page
);
// XXX wcfs: remmap page(s) to base file
}
...
...
@@ -515,6 +515,8 @@ void fileh_invalidate_page(BigFileH *fileh, pgoff_t pgoffset)
/* else we just make sure to drop page memory */
else
{
page_drop_memory
(
page
);
// XXX + page_del ?
// XXX + pagemap_del ?
}
}
...
...
@@ -774,6 +776,7 @@ VMFaultResult vma_on_pagefault(VMA *vma, uintptr_t addr, int write)
if
(
page
->
state
==
PAGE_LOADING_INVALIDATED
)
{
page_drop_memory
(
page
);
page_del
(
page
);
// XXX + pagemap_del ?
// list_del(&page->lru);
// bzero(page, sizeof(*page)); /* just in case */
// free(page);
...
...
@@ -880,6 +883,7 @@ static int __ram_reclaim(RAM *ram)
}
/* PAGE_EMPTY pages without mappers go away */
// XXX merge vvv with ^^^ : page_drop_memory + pagemap_del + page_del
if
(
page
->
state
==
PAGE_EMPTY
)
{
BUG_ON
(
page
->
refcnt
!=
0
);
// XXX what for then we have refcnt? -> vs discard
...
...
@@ -945,6 +949,7 @@ void *page_mmap(Page *page, void *addr, int prot)
}
// XXX -> page_drop = drop memory, delete page from pagemap, delete page
static
void
page_drop_memory
(
Page
*
page
)
{
/* Memory for this page goes out. 1) unmap it from all mmaps */
...
...
@@ -973,8 +978,14 @@ static void page_drop_memory(Page *page)
// XXX touch lru?
}
/* page_del deletes Page struct (but not page memory - see page_drop_memory). */
/* page_del deletes Page struct (but not page memory - see page_drop_memory).
*
* The page is removed from ram->lru.
*/
static
void
page_del
(
Page
*
page
)
{
BUG_ON
(
page
->
refcnt
!=
0
);
BUG_ON
(
page
->
state
==
PAGE_DIRTY
);
// XXX + PAGE_LOADING ?
list_del
(
&
page
->
lru
);
bzero
(
page
,
sizeof
(
*
page
));
/* just in case */
free
(
page
);
...
...
wcfs/wcfs_test.py
View file @
3a82b464
...
...
@@ -1786,7 +1786,7 @@ def test_wcfs_watch_vs_access():
# verify that on pin message, while under pagefault, we can mmap @at/f[blk]
# into where head/f[blk] was mmaped; the result of original pagefaulting read
# must be from newly ins
t
erted mapping.
# must be from newly inserted mapping.
#
# TODO same with two mappings to the same file, but only one changing blk mmap
# -> one read gets changed data, one read gets data from @head.
...
...
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