use posix_fadvise instead of posix_fadvise64
This commit is contained in:
parent
24cc321931
commit
f70f94dfb8
1 changed files with 2 additions and 2 deletions
|
@ -841,8 +841,8 @@ struct llama_mmap {
|
||||||
// prefetch/readahead impairs performance on NUMA systems
|
// prefetch/readahead impairs performance on NUMA systems
|
||||||
if (numa) { prefetch = 0; }
|
if (numa) { prefetch = 0; }
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if (posix_fadvise64(fd, 0, file->size, POSIX_FADV_SEQUENTIAL)) {
|
if (posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL)) {
|
||||||
fprintf(stderr, "warning: fadvise(.., POSIX_FADV_SEQUENTIAL) failed: %s\n",
|
fprintf(stderr, "warning: posix_fadvise(.., POSIX_FADV_SEQUENTIAL) failed: %s\n",
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
if (prefetch) { flags |= MAP_POPULATE; }
|
if (prefetch) { flags |= MAP_POPULATE; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue