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
82f28080
Commit
82f28080
authored
Jul 10, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0d10ef28
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
22 deletions
+7
-22
Makefile
Makefile
+2
-2
bigfile/virtmem.c
bigfile/virtmem.c
+5
-20
No files found.
Makefile
View file @
82f28080
...
...
@@ -96,8 +96,8 @@ LINKC = $(LINK.c) $< $(LOADLIBES) $(LDLIBS) -o $@
# tests without instrumentation
test.t
:
$(TESTS:%=%.trun)
%.trun
:
%.t
#
gdb -q -ex run -ex backtrace -ex quit
$
(
XRUN<
)
$
(
XRUN<
)
gdb
-q
-ex
run
-ex
backtrace
-ex
quit
$
(
XRUN<
)
#
$
(
XRUN<
)
%.t
:
%.c $(ccan_config)
$(LINKC)
...
...
bigfile/virtmem.c
View file @
82f28080
...
...
@@ -806,32 +806,12 @@ VMFaultResult vma_on_pagefault(VMA *vma, uintptr_t addr, int write)
/* (6) page data ready. Mmap it atomically into vma address space, or mprotect
* appropriately if it was already mmaped. */
int
prot
=
PROT_READ
;
PageState
newstate
=
PAGE_LOADED
;
// XXX vvv PAGE_LOADED_FOR_WRITE ok?
if
(
write
||
page
->
state
==
PAGE_DIRTY
||
page
->
state
==
PAGE_LOADED_FOR_WRITE
)
{
prot
|=
PROT_WRITE
;
newstate
=
PAGE_DIRTY
;
}
// 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
);
#if 0
if (!bitmap_test_bit(vma->page_ismappedv, page->f_pgoffset - vma->f_pgoffset)) {
// XXX err
page_mmap(page, vma_page_addr(vma, page), prot);
bitmap_set_bit(vma->page_ismappedv, page->f_pgoffset - vma->f_pgoffset);
page_incref(page);
}
else {
/* just changing protection bits should not fail, if parameters ok */
xmprotect(vma_page_addr(vma, page), page_size(page), prot);
}
#endif
// XXX also call page->markdirty() ?
// XXX move ^^^ before vma_mmap_page
if
(
newstate
==
PAGE_DIRTY
&&
newstate
!=
page
->
state
)
{
/* it is not allowed to modify pages while writeout is in progress */
BUG_ON
(
fileh
->
writeout_inprogress
);
...
...
@@ -840,6 +820,11 @@ 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
);
/* mark page as used recently */
// XXX = list_move_tail()
list_del
(
&
page
->
lru
);
...
...
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