src/recdb.c (parse_database): Advise the kernel that we will scan the
recdb file sequentially, just in case it cannot notice the access
pattern on its own.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-6
# arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3
#
+2006-04-05 00:11:31 GMT Michael Poole <mdpoole@troilus.org> patch-6
+
+ Summary:
+ Advise the kernel that we will scan DB files sequentially.
+ Revision:
+ srvx--devo--1.3--patch-6
+
+ src/recdb.c (parse_database): Advise the kernel that we will scan the
+ recdb file sequentially, just in case it cannot notice the access
+ pattern on its own.
+
+ modified files:
+ ChangeLog src/recdb.c
+
+
2006-04-05 00:09:48 GMT Michael Poole <mdpoole@troilus.org> patch-5
Summary:
/* Try mmap */
if (!mmap_error && (recdb.s = mmap(NULL, recdb.length, PROT_READ|PROT_WRITE, MAP_PRIVATE, fileno(recdb.f), 0)) != MAP_FAILED) {
recdb.type = RECDB_MMAP;
+ madvise(recdb.s, recdb.length, MADV_SEQUENTIAL);
} else {
/* Fall back to stdio */
if (!mmap_error) {