HomeFreeBSD

Use bogus_page to properly reduce number of I/Os in sendfile(2). The new

Description

Use bogus_page to properly reduce number of I/Os in sendfile(2). The new
sendfile_swapin() loop works this way:

  • Find first invalid page in the request.
  • Do vm_pager_has_page() and get count of pages, that can be taken in single I/O.
  • Trim valid pages from the end of the request.
  • Cycle through the request and substitute to bogus_page all valid pages that are in the middle of the request.
  • After I/O launched (pager copies array of pages into buf(9), it is important to restore proper page pointers with help vm_page_lookup().

Count bogus pages used and report them in sendfile stats.

Details

Provenance
glebiusAuthored on
Parents
rS308782: After some ZIL changes 6 years ago zil_slog_limit got partially broken
Branches
Unknown
Tags
Unknown