Page MenuHomeFreeBSD

FFS: allow sendfile(2) to work with block sizes greater than the page size
ClosedPublic

Authored by jah on Feb 25 2019, 4:42 AM.
Tags
None
Referenced Files
F161146285: D19340.diff
Tue, Jun 30, 11:32 PM
Unknown Object (File)
Tue, Jun 30, 10:21 AM
Unknown Object (File)
Mon, Jun 29, 11:00 PM
Unknown Object (File)
Mon, Jun 29, 9:21 AM
Unknown Object (File)
Fri, Jun 26, 7:50 PM
Unknown Object (File)
Wed, Jun 24, 5:46 AM
Unknown Object (File)
Tue, Jun 23, 3:40 PM
Unknown Object (File)
Tue, Jun 23, 1:02 AM
Subscribers

Details

Summary

Implement ffs_getpages_async(), which when possible calls the asynchronous
flavor of the generic pager's getpages function. When the underlying
block size is larger than the system page size, however, it will invoke
the (synchronous) buffer cache pager, followed by a call to the client
completion routine. This retains true asynchronous completion in the most
common (block size <= page size) case, which is important for the performance
of the new sendfile(2). The behavior in the larger block size case mirrors
the default implementation of VOP_GETPAGES_ASYNC, which most other
filesystems use anyway as they do not override the getpages_async method.

While here, fix an incorrect assert in the generic pager code.

PR: 235708

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib added inline comments.
sys/vm/vnode_pager.c
796 ↗(On Diff #54331)

Perhaps this should be committed on its own.

This revision is now accepted and ready to land.Feb 25 2019, 7:18 AM
glebius added inline comments.
sys/vm/vnode_pager.c
796 ↗(On Diff #54331)

Yes, absolutely.

This revision was automatically updated to reflect the committed changes.