packagefs: Open HPKG files as O_NOCACHE.
We have not one but two internal caches in packagefs for *uncompressed* data; we do not need the underlying filesystem to cache the *compressed* data needlessly. This seems to be a negligible memory and boot speed improvement at best, although it will likely help in low-memory situations in reducing the pressure on the file cache (... actually it doesn't look like the file cache responds to low resource notifications at all, which may be relevant here.)
This commit is contained in:
@@ -649,7 +649,8 @@ Package::Open()
|
||||
}
|
||||
|
||||
// open the file
|
||||
fFD = openat(fPackagesDirectory->DirectoryFD(), fFileName, O_RDONLY);
|
||||
fFD = openat(fPackagesDirectory->DirectoryFD(), fFileName,
|
||||
O_RDONLY | O_NOCACHE);
|
||||
if (fFD < 0) {
|
||||
ERROR("Failed to open package file \"%s\": %s\n", fFileName.Data(),
|
||||
strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user