Date: Sat, 8 Aug 2020 03:40:41 +0200 From: Mateusz Guzik <mjguzik@gmail.com> To: Alan Somers <asomers@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r364044 - in head: share/man/man9 sys/compat/linuxkpi/common/src sys/kern sys/security/audit sys/sys Message-ID: <CAGudoHGX8zJXr=NZer8YkDs98LisayCOFGVL=tQsm8ghv1QdsQ@mail.gmail.com> In-Reply-To: <CAGudoHFwQtcftxGfVCSsM9GPXsFR=Pt3iWQQphLoFM7WGmm%2BbA@mail.gmail.com> References: <202008072306.077N6fjP084661@repo.freebsd.org> <CAOtMX2iOJ_zZV84RrxD9BHokZR3nWiiZ8VV%2BU9bscZPYogvOGA@mail.gmail.com> <CAGudoHFwQtcftxGfVCSsM9GPXsFR=Pt3iWQQphLoFM7WGmm%2BbA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
or to put differently, the difference is disapperance of vn_stat from the codepath. On 8/8/20, Mateusz Guzik <mjguzik@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@freebsd.org> wrote: >> On Fri, Aug 7, 2020 at 5:06 PM Mateusz Guzik <mjg@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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHGX8zJXr=NZer8YkDs98LisayCOFGVL=tQsm8ghv1QdsQ>