clear_system_cache: Sync dirty pages before ClearCacheForFile(s)
In http://crbug.com/881384#c2 I saw some more evidence that the page cache is not fully flushed when benchmarking. On Linux/Android calling sync(2) syscall before evicting individual files should help because the later pagecache dropping operations become a lot cheaper for the kernel. I could not find good documentation about sync(2) guarantees on MacOS. The page cache flushing for individual files is still asynchronous, with no cheap way to check that it happened. The plan is to sleep for one second after such operations. Since we would prefer to sleep only once per bulk of operations, the sleeping will be done on higher levels. The Windows story is not covered - the operation requires administrator privileges. Bug: 811244 Change-Id: Ib71f4f934a0eb4b438bfedbbb50462e07ff64308 Reviewed-on: https://chromium-review.googlesource.com/1211602 Commit-Queue: Egor Pasko <pasko@chromium.org> Reviewed-by:Bruce Dawson <brucedawson@chromium.org> Reviewed-by:
Albert J. Wong <ajwong@chromium.org> Cr-Commit-Position: refs/heads/master@{#590266}
Showing
Please register or sign in to comment