On 22/11/2020 18:06, Kyle Evans wrote: > On Sun, Nov 22, 2020 at 6:00 AM Dimitry Andric <d...@freebsd.org> wrote: >> I'd guess it's an unintended side-effect of >> https://svnweb.freebsd.org/base?view=revision&revision=366697 >> ("install(1): Avoid unncessary fstatfs() calls and use mmap() based on >> size"). >> > > Almost certainly -- before, we would never attempt to mmap() on ZFS. > > Tossing arichardson@ into CC as the committer > Tossing mmacy@ and freqlabs@ into CC as ZFS folks > > Looking through sys/contrib/openzfs, there's special handling for mmap > on linux because it bypasses the page cache and relies on caching in > ARC. AFAICT the FreeBSD side seems to handle write() to mmap'd > regions, but doesn't do anything with VOP_MMAPPED which might be > needed to sync the file when it's mmap'd for reading like this. My > understanding of how this is supposed to actually work on FreeBSD is > limited, though, so I defer...
Last time I checked mmap worked correctly with ZFS, that was before the switch. Perhaps, there was an undetected issue -- this can be tested, e.g., by applying the install change to stable/12. Perhaps, the ZFS switch came with a regression. -- Andriy Gapon _______________________________________________ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"