svn commit: r364044 - in head: share/man/man9 sys/compat/linuxkpi/common/src sys/kern sys/security/audit sys/sys
Mateusz Guzik
mjguzik at gmail.com
Sat Aug 8 01:40:44 UTC 2020
or to put differently, the difference is disapperance of vn_stat from
the codepath.
On 8/8/20, Mateusz Guzik <mjguzik at gmail.com> wrote:
> tmpfs_getattr fills > 100 bytes worth of data into struct vattr, which
> then has to be converted to struct stat format. The conversion happens
> to copy some of it as it is and branch on other stuff. tmpfs_stat
> elides the entire process.
>
> On 8/8/20, Alan Somers <asomers at freebsd.org> wrote:
>> On Fri, Aug 7, 2020 at 5:06 PM Mateusz Guzik <mjg at freebsd.org> wrote:
>>
>>> Author: mjg
>>> Date: Fri Aug 7 23:06:40 2020
>>> New Revision: 364044
>>> URL: https://svnweb.freebsd.org/changeset/base/364044
>>>
>>> Log:
>>> vfs: add VOP_STAT
>>>
>>> The current scheme of calling VOP_GETATTR adds avoidable overhead.
>>>
>>> An example with tmpfs doing fstat (ops/s):
>>> before: 7488958
>>> after: 7913833
>>>
>>> Reviewed by: kib (previous version)
>>> Differential Revision: https://reviews.freebsd.org/D25910
>>>
>>> Modified:
>>> head/share/man/man9/Makefile
>>> head/share/man/man9/VOP_ATTRIB.9
>>> head/sys/compat/linuxkpi/common/src/linux_compat.c
>>> head/sys/kern/vfs_default.c
>>> head/sys/kern/vfs_syscalls.c
>>> head/sys/kern/vfs_vnops.c
>>> head/sys/kern/vnode_if.src
>>> head/sys/security/audit/audit_arg.c
>>> head/sys/sys/vnode.h
>>>
>>
>> What avoidable overhead? The tmpfs_stat handler that you added in your
>> next
>> commit looks pretty much the same as vop_getattr. I'm missing where the
>> performance improvement comes from. Could you please fill me in?
>> -Alan
>>
>
>
> --
> Mateusz Guzik <mjguzik gmail.com>
>
--
Mateusz Guzik <mjguzik gmail.com>
More information about the svn-src-all
mailing list