HomeFreeBSD

pipe: reduce atime precision

Description

pipe: reduce atime precision

The routine is called on successful write and read, which on pipes happens a
lot and for small sizes.

Precision provided by default seems way bigger than necessary and it causes
problems in vms on amd64 (it rdtscp's which vmexits). getnanotime seems to
provide the level roughly in lines of Linux so we should be good here.

Sample result from will-it-scale pipe1_processes -t 1 (ops/s):
before: 426464
after: 3247421

Note the that atime handling for named pipes is broken with and without the
patch. The filesystem code is never used for updating atime and never looks
at the updated field. Consequently, while there are no provisions added to
handle named pipes separately, the change is a nop for that case.

Differential Revision: https://reviews.freebsd.org/D23964

Details

Provenance
mjgAuthored on
Differential Revision
D23964: pipe: reduce atime precision
Parents
rS363929: o Add machine/iommu.h and include MD iommu headers from it,
Branches
Unknown
Tags
Unknown