wakedelay.better.diff

fgudin, 08/26/2012 01:02 PM

Download (2.05 KB)

View differences:

sys/boot/common/loader.8
759 759
.Nm initrd .
760 760
See
761 761
.Xr mkinitrd 8 .
762
.It Va vfs.root.wakedelay
763
Specify an additional delay (default is 2 seconds if unspecified) before trying to mount root.
762 764
.El
763 765
.Sh FILES
764 766
.Bl -tag -width /boot/defaults/dloader.menu -compact
sys/boot/dloader/loader.conf
94 94
#kern.ipc.nmbufs=""		# Set the maximum number of mbufs
95 95
#kern.vm.kmem.size=""		# Sets the size of kernel memory (bytes)
96 96
#net.inet.tcp.tcbhashsize=""	# Set the value of TCBHASHSIZE
97
#vfs.root.wakedelay=""		# Delay in seconds before trying to mount the root
97 98
#vfs.root.mountfrom=""		# Specify root partition in a way the
98 99
				# kernel understands. You can specify a semicolon
99 100
				# separated device list which will be tried.
sys/kern/vfs_conf.c
102 102
static int	setrootbyname(char *name);
103 103

  
104 104
SYSINIT(mountroot, SI_SUB_MOUNT_ROOT, SI_ORDER_SECOND, vfs_mountroot, NULL);
105
	
105

  
106
static int wakedelay = 2;	/* delay before mounting root: defaults to 2 seconds */
107
TUNABLE_INT("vfs.root.wakedelay", &wakedelay);
108

  
106 109
/*
107 110
 * Find and mount the root filesystem
108 111
 */
......
121 124
	 * Messages can fly around here so get good synchronization
122 125
	 * coverage.
123 126
	 *
124
	 * XXX - Delay an additional 2 seconds to help drivers which pickup
127
	 * XXX - Delay some more (default: 2s) to help drivers which pickup
125 128
	 *       devices asynchronously and are not caught by CAM's initial
126 129
	 *	 probe.
127 130
	 */
128 131
	sync_devs();
129
	tsleep(&dummy, 0, "syncer", hz*2);
132
	tsleep(&dummy, 0, "syncer", hz*wakedelay);
130 133

  
131 134

  
132 135
	/*