Module Name: src
Committed By: martin
Date: Thu Aug 9 13:24:41 UTC 2018
Modified Files:
src/sys/fs/tmpfs [netbsd-8]: tmpfs_vfsops.c
Log Message:
Pull up following revision(s) (requested by christos in ticket #968):
sys/fs/tmpfs/tmpfs_vfsops.c: revision 1.73
Fix tmpfs performance regression from rmind@:
Just from a very quick look, it seems like a regression introduced with
the vcache changes: the MP-safe flag is set too late and not inherited
by the root vnode.
To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.72.2.1 src/sys/fs/tmpfs/tmpfs_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/tmpfs/tmpfs_vfsops.c
diff -u src/sys/fs/tmpfs/tmpfs_vfsops.c:1.72 src/sys/fs/tmpfs/tmpfs_vfsops.c:1.72.2.1
--- src/sys/fs/tmpfs/tmpfs_vfsops.c:1.72 Thu Jun 1 02:45:13 2017
+++ src/sys/fs/tmpfs/tmpfs_vfsops.c Thu Aug 9 13:24:41 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_vfsops.c,v 1.72 2017/06/01 02:45:13 chs Exp $ */
+/* $NetBSD: tmpfs_vfsops.c,v 1.72.2.1 2018/08/09 13:24:41 martin Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.72 2017/06/01 02:45:13 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.72.2.1 2018/08/09 13:24:41 martin Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -182,6 +182,13 @@ tmpfs_mount(struct mount *mp, const char
return 0;
}
+ mp->mnt_flag |= MNT_LOCAL;
+ mp->mnt_stat.f_namemax = TMPFS_MAXNAMLEN;
+ mp->mnt_fs_bshift = PAGE_SHIFT;
+ mp->mnt_dev_bshift = DEV_BSHIFT;
+ mp->mnt_iflag |= IMNT_MPSAFE | IMNT_CAN_RWTORO;
+ vfs_getnewfsid(mp);
+
/* Allocate the tmpfs mount structure and fill it. */
tmp = kmem_zalloc(sizeof(tmpfs_mount_t), KM_SLEEP);
tmp->tm_nodes_max = nodes;
@@ -220,13 +227,6 @@ tmpfs_mount(struct mount *mp, const char
tmp->tm_root = root;
vrele(vp);
- mp->mnt_flag |= MNT_LOCAL;
- mp->mnt_stat.f_namemax = TMPFS_MAXNAMLEN;
- mp->mnt_fs_bshift = PAGE_SHIFT;
- mp->mnt_dev_bshift = DEV_BSHIFT;
- mp->mnt_iflag |= IMNT_MPSAFE | IMNT_CAN_RWTORO;
- vfs_getnewfsid(mp);
-
error = set_statvfs_info(path, UIO_USERSPACE, "tmpfs", UIO_SYSSPACE,
mp->mnt_op->vfs_name, mp, curlwp);
if (error) {