Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
remi
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
remi
Commits
3a2fcd0e
Commit
3a2fcd0e
authored
Oct 10, 2018
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added use of madvise
parent
d33334a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
src/remi-client.cpp
src/remi-client.cpp
+3
-0
src/remi-server.cpp
src/remi-server.cpp
+2
-0
No files found.
src/remi-client.cpp
View file @
3a2fcd0e
...
...
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
...
...
@@ -173,6 +174,8 @@ extern "C" int remi_fileset_migrate(
cleanup
();
return
REMI_ERR_ALLOCATION
;
}
// indicate sequential access
madvise
(
segment
,
size
,
MADV_SEQUENTIAL
);
// close file descriptor
close
(
fd
);
// insert the segment
...
...
src/remi-server.cpp
View file @
3a2fcd0e
...
...
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
...
...
@@ -120,6 +121,7 @@ struct remi_provider : public tl::provider<remi_provider> {
req
.
respond
(
result
);
return
;
}
madvise
(
segment
,
filesizes
[
i
],
MADV_SEQUENTIAL
);
theData
.
emplace_back
(
segment
,
filesizes
[
i
]);
i
+=
1
;
}
...
...
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