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
5da97fd3
Commit
5da97fd3
authored
Oct 01, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
94e06c4a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
7 deletions
+27
-7
bigfile/virtmem.c
bigfile/virtmem.c
+1
-1
include/wendelin/bigfile/file.h
include/wendelin/bigfile/file.h
+18
-4
wcfs/__init__.py
wcfs/__init__.py
+8
-2
No files found.
bigfile/virtmem.c
View file @
5da97fd3
...
...
@@ -288,7 +288,7 @@ int fileh_mmap(VMA *vma, BigFileH *fileh, pgoff_t pgoffset, pgoff_t pglen)
if
(
!
(
pgoffset
<=
page
->
f_pgoffset
&&
page
->
f_pgoffset
<
pgoffset
+
pglen
))
continue
;
/* page is out of requested mmap coverage */
// XXX notify watcher that we mmap RAM page in its range?
// XXX notify watcher that we mmap RAM page in its range?
-> no need
vma_mmap_page
(
vma
,
page
);
}
}
...
...
include/wendelin/bigfile/file.h
View file @
5da97fd3
...
...
@@ -81,9 +81,21 @@ struct bigfile_ops {
*
* The mapping will be used as the base read-only layer for vma.
*
* XXX bigfile backend owns setup mapping and can change it dynamically
* e.g. due to changes to the file from outside. However it should XXX
* check dirtyv and if dirty=1 not change that page until remmap_blk_read.
* After setup bigfile backend manages the mapping and can change it dynamically
* e.g. due to changes to the file from outside. However before changing a page,
* the backend must check if that page was already dirtied by virtmeme and if
* so don't change that page until virtmem calls .remmap_blk_read.
*
* The checking has to be done with virtmem lock held. A sketch of mapping
* update sequence is as below:
*
* # backend detects that block is changed from outside
* # fileh is vma->fileh - file handle with which the vma is associated
* virt_lock()
* if (!fileh_blk_isdirty(fileh, blk)) {
* // update mappings for all fileh's vma that cover blk
* }
* virt_unlock()
*
* XXX called under virtmem lock?
*
...
...
@@ -96,7 +108,9 @@ struct bigfile_ops {
void
*
(
*
mmap_setup_read
)
(
BigFile
*
file
,
blk_t
blk
,
size_t
blklen
,
VMA
*
vma
);
// XXX
// remmap_blk_read is called to remmap a block into vma again, after e.g.
// RW dirty page was discarded.
//
// XXX called under virtmem lock?
//
// XXX error -> bug (must not fail)
...
...
wcfs/__init__.py
View file @
5da97fd3
...
...
@@ -21,7 +21,7 @@
"""Module wcfs.py provides python gateway for spawning and interoperating with wcfs server
Join(zurl) joins wcfs server. If wcfs server for zurl is not yet running, it
will be automatically started if `autostart=True`
parameter
is passed to join.
will be automatically started if `autostart=True` is passed to join.
It will also be automatically started by default unless
$WENDELIN_CORE_WCFS_AUTOSTART=no is specified in environment.
...
...
@@ -233,10 +233,16 @@ def _pin1(wconn, req):
trace
(
'
\
t
remmapblk %d @%s'
%
(
req
.
blk
,
(
h
(
req
.
at
)
if
req
.
at
else
"head"
)))
# FIXME check if virtmem did not mapped RW page into this block already
mmap
.
_remmapblk
(
req
.
blk
,
req
.
at
)
# -> check if virtmem did not dirtied page corresponding to this block already
virt_lock
()
if
not
fileh_blk_isdirty
(
mmap
.
fileh
,
req
.
blk
):
mmap
.
_remmapblk
(
req
.
blk
,
req
.
at
)
virt
unlock
()
trace
(
'
\
t
-> remmaped'
)
# update f.pinned
# XXX do it before ^^^ remmapblk (so that e.g. concurrent
# discard/writeout see correct f.pinned) ?
if
req
.
at
is
None
:
f
.
pinned
.
pop
(
req
.
blk
,
None
)
# = delete(f.pinned, req.blk) -- unpin to @head
else
:
...
...
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