projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use MAP_POPULATE to reduce pagefault when available
[lttng-ust.git]
/
libringbuffer
/
shm.c
diff --git
a/libringbuffer/shm.c
b/libringbuffer/shm.c
index 10b3bcef110a979ce2169ccf10417e470e122ba9..909991ed27c6f1ada4a04426e396d232d126df8e 100644
(file)
--- a/
libringbuffer/shm.c
+++ b/
libringbuffer/shm.c
@@
-40,6
+40,7
@@
#endif
#include <helper.h>
#include <ust-fd.h>
#endif
#include <helper.h>
#include <ust-fd.h>
+#include "mmap.h"
/*
* Ensure we have the required amount of space available by writing 0
/*
* Ensure we have the required amount of space available by writing 0
@@
-154,7
+155,7
@@
struct shm_object *_shm_object_table_alloc_shm(struct shm_object_table *table,
/* memory_map: mmap */
memory_map = mmap(NULL, memory_map_size, PROT_READ | PROT_WRITE,
/* memory_map: mmap */
memory_map = mmap(NULL, memory_map_size, PROT_READ | PROT_WRITE,
- MAP_SHARED, shmfd, 0);
+ MAP_SHARED
| LTTNG_MAP_POPULATE
, shmfd, 0);
if (memory_map == MAP_FAILED) {
PERROR("mmap");
goto error_mmap;
if (memory_map == MAP_FAILED) {
PERROR("mmap");
goto error_mmap;
@@
-341,7
+342,7
@@
struct shm_object *shm_object_table_append_shm(struct shm_object_table *table,
/* memory_map: mmap */
memory_map = mmap(NULL, memory_map_size, PROT_READ | PROT_WRITE,
/* memory_map: mmap */
memory_map = mmap(NULL, memory_map_size, PROT_READ | PROT_WRITE,
- MAP_SHARED, shm_fd, 0);
+ MAP_SHARED
| LTTNG_MAP_POPULATE
, shm_fd, 0);
if (memory_map == MAP_FAILED) {
PERROR("mmap");
goto error_mmap;
if (memory_map == MAP_FAILED) {
PERROR("mmap");
goto error_mmap;
This page took
0.023077 seconds
and
4
git commands to generate.