tree: da0ca7e4dedeac2f8b7a4595c69a68522f171749 [path history] [tgz]
  1. dbus_bindings/
  2. init/
  3. BUILD.gn
  4. daemon.cc
  5. daemon.h
  6. DIR_METADATA
  7. kernel_trace_reader.cc
  8. kernel_trace_reader.h
  9. main.cc
  10. OWNERS
  11. prefetch_helper.cc
  12. prefetch_helper.h
  13. prefetch_helper_test.cc
  14. README.md
  15. trace_manager.cc
  16. trace_manager.h
  17. trace_manager_test.cc
  18. trace_reader.h
  19. trace_session.h
farfetchd/README.md

Farfetchd: generalizing readahead-as-a-service

Farfetchd is a file prefetching D-Bus service. Prefetching is available using the following interfaces:

  • Method PreloadFile: Reads the file at the given path into the cache using pread(). This is performed synchronously (within the service).
  • Method PreloadFileAsync: Reads the file at the given path into the cache using readahead(). readahead() has a max read limit of 32 pages per read so reading a file larger than that may result in multiple syscalls being scheduled. This is performed asynchronously.
  • Method PreloadFileMmap: Reads the file at the given path and saves it into the cache using the MAP_POPULATE and MAP_SHARED flags. Immediately after, mummap() is then run to free memory (this will not affect the cache). This is performed asynchronously.

more info at go/cros-farfetchd.