Date: Sun, 1 Dec 2019 01:07:25 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Mateusz Guzik <mjg@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r355227 - head/sys/fs/tmpfs Message-ID: <20191130230725.GB10580@kib.kiev.ua> In-Reply-To: <201911301641.xAUGfmMt029299@repo.freebsd.org> References: <201911301641.xAUGfmMt029299@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 30, 2019 at 04:41:48PM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Sat Nov 30 16:41:47 2019 > New Revision: 355227 > URL: https://svnweb.freebsd.org/changeset/base/355227 > > Log: > tmpfs: add fast path to tmpfs_access for common case lookup > > VEXEC consists of vast majority of all calls and almost all targets have > at least 0111. On what load VEXEC is the dominant access check ? > > Modified: > head/sys/fs/tmpfs/tmpfs_vnops.c > > Modified: head/sys/fs/tmpfs/tmpfs_vnops.c > ============================================================================== > --- head/sys/fs/tmpfs/tmpfs_vnops.c Sat Nov 30 16:40:16 2019 (r355226) > +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sat Nov 30 16:41:47 2019 (r355227) > @@ -331,6 +331,12 @@ tmpfs_access(struct vop_access_args *v) > > node = VP_TO_TMPFS_NODE(vp); > > + /* > + * Common case path lookup. > + */ > + if (__predict_true(accmode == VEXEC && (node->tn_mode & 0111) == 0111)) The 0111 must be spelled as (S_IXUSR | S_IXGRP | S_IXOTH). > + return (0); > + > switch (vp->v_type) { > case VDIR: > /* FALLTHROUGH */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191130230725.GB10580>