projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43ec3d6
)
[PATCH] Pin the mmap'ed output buffers in ram
author
Jens Axboe
<axboe@suse.de>
Thu, 9 Feb 2006 07:34:51 +0000
(08:34 +0100)
committer
Jens Axboe
<axboe@suse.de>
Thu, 9 Feb 2006 07:34:51 +0000
(08:34 +0100)
blktrace.c
patch
|
blob
|
blame
|
history
diff --git
a/blktrace.c
b/blktrace.c
index 6e62d4796912532d76d54372f98c021d5c2b1840..549f484d22006587c551d68c2127959d7d69e9d4 100644
(file)
--- a/
blktrace.c
+++ b/
blktrace.c
@@
-387,6
+387,7
@@
static int mmap_subbuf(struct thread_information *tip)
*/
if (tip->fs_off + buf_size > tip->fs_buf_len) {
if (tip->fs_buf) {
+ munlock(tip->fs_buf, tip->fs_buf_len);
munmap(tip->fs_buf, tip->fs_buf_len);
tip->fs_buf = NULL;
}
@@
-406,6
+407,7
@@
static int mmap_subbuf(struct thread_information *tip)
perror("mmap");
return -1;
}
+ mlock(tip->fs_buf, tip->fs_buf_len);
}
ret = read_data(tip, tip->fs_buf + tip->fs_off, buf_size);