Re: svn commit: r364044 - in head: share/man/man9 sys/compat/linuxkpi/common/src sys/kern sys/security/audit sys/sys
So it's just the struct copy, then? I'm impressed that it made that much difference to remove it. -Alan On Fri, Aug 7, 2020 at 7:40 PM Mateusz Guzik wrote: > or to put differently, the difference is disapperance of vn_stat from > the codepath. > > On 8/8/20, Mateusz Guzik 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 wrote: > >> On Fri, Aug 7, 2020 at 5:06 PM Mateusz Guzik 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 > > > > > -- > Mateusz Guzik > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r364044 - in head: share/man/man9 sys/compat/linuxkpi/common/src sys/kern sys/security/audit sys/sys
or to put differently, the difference is disapperance of vn_stat from the codepath. On 8/8/20, Mateusz Guzik 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 wrote: >> On Fri, Aug 7, 2020 at 5:06 PM Mateusz Guzik 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 > -- Mateusz Guzik ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r364044 - in head: share/man/man9 sys/compat/linuxkpi/common/src sys/kern sys/security/audit sys/sys
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 wrote: > On Fri, Aug 7, 2020 at 5:06 PM Mateusz Guzik 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 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r364044 - in head: share/man/man9 sys/compat/linuxkpi/common/src sys/kern sys/security/audit sys/sys
On Fri, Aug 7, 2020 at 5:06 PM Mateusz Guzik 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 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"