Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs Don't create a huge number of unnec...
details: https://anonhg.NetBSD.org/src/rev/14025efcbdfe
branches: trunk
changeset: 785866:14025efcbdfe
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Apr 03 20:23:01 2013 +0000
description:
Don't create a huge number of unnecessary device nodes automatically.
Creating them takes 70-or-so ms on a RPi, and can almost double the
bootstrap time of a rump kernel on that hardware.
diffstat:
sys/rump/librump/rumpvfs/rump_vfs.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r c594a3e24742 -r 14025efcbdfe sys/rump/librump/rumpvfs/rump_vfs.c
--- a/sys/rump/librump/rumpvfs/rump_vfs.c Wed Apr 03 20:21:38 2013 +0000
+++ b/sys/rump/librump/rumpvfs/rump_vfs.c Wed Apr 03 20:23:01 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_vfs.c,v 1.71 2013/01/14 16:45:47 pooka Exp $ */
+/* $NetBSD: rump_vfs.c,v 1.72 2013/04/03 20:23:01 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.71 2013/01/14 16:45:47 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.72 2013/04/03 20:23:01 pooka Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -91,8 +91,6 @@
RUMP_COMPONENT(RUMP__FACTION_VFS)
{
- extern struct devsw_conv devsw_conv0[];
- extern int max_devsw_convs;
extern struct vfsops rumpfs_vfsops;
char buf[64];
int error;
@@ -180,7 +178,22 @@
module_init_class(MODULE_CLASS_VFS);
+ /*
+ * Don't build device names for a large set of devices by
+ * default. While the pseudo-devfs is a fun experiment,
+ * creating many many device nodes may increase rump kernel
+ * bootstrap time by ~40%. Device nodes should be created
+ * per-demand in the component constructors.
+ */
+#if 0
+ {
+ extern struct devsw_conv devsw_conv0[];
+ extern int max_devsw_convs;
rump_vfs_builddevs(devsw_conv0, max_devsw_convs);
+ }
+#else
+ rump_vfs_builddevs(NULL, 0);
+#endif
rump_component_init(RUMP_COMPONENT_VFS);
}
Home |
Main Index |
Thread Index |
Old Index