Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wla70:vdr_2.6.7
vdr
vdr-2.4.7_FADVISE-Enable.patch.off
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File vdr-2.4.7_FADVISE-Enable.patch.off of Package vdr
--- a/tools.c +++ b/tools.c @@ -1781,7 +1781,7 @@ // --- cUnbufferedFile ------------------------------------------------------- #ifndef USE_FADVISE_READ -#define USE_FADVISE_READ 0 +#define USE_FADVISE_READ 1 #endif #ifndef USE_FADVISE_WRITE #define USE_FADVISE_WRITE 1 @@ -1808,11 +1808,11 @@ begin = lastpos = ahead = 0; cachedstart = 0; cachedend = 0; - readahead = KILOBYTE(128); + readahead = KILOBYTE(256); written = 0; totwritten = 0; if (fd >= 0) - posix_fadvise(fd, 0, 0, POSIX_FADV_RANDOM); // we could use POSIX_FADV_SEQUENTIAL, but we do our own readahead, disabling the kernel one. + posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL); // we could use POSIX_FADV_SEQUENTIAL, but we do our own readahead, disabling the kernel one. #endif return fd; } @@ -1885,13 +1885,14 @@ // Trigger the readahead IO, but only if we've used at least // 1/2 of the previously requested area. This avoids calling // fadvise() after every read() call. - if (ahead - curpos < (off_t)(readahead / 2)) { + if (ahead - curpos < (off_t)((readahead * 1 )/ 10)) { posix_fadvise(fd, curpos, readahead, POSIX_FADV_WILLNEED); ahead = curpos + readahead; cachedend = max(cachedend, ahead); } if (readahead < Size * 32) { // automagically tune readahead size. readahead = Size * 32; + isyslog("Adjusting read ahead to: %jd KB", (intmax_t) readahead / 1024); } } else
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor