Commit f09be44e authored by Jim Harris's avatar Jim Harris Committed by Darek Stojaczyk
Browse files

setup.sh: modprobe msr if /dev/cpu/0/msr not available



SPDK/DPDK startup time can be very important - especially
in secondary processes.  If DPDK cannot figure out the
TSC via cpuid or rdmsr, it will instead use a 100ms sleep
to calculate the TSC.  On Fedora kernels, the msr module
is linked into the kernel, enabling rdmsr and bypassing
this 100ms sleep.  But on Ubuntu kernels, the user must
explicitly load the msr module, otherwise it will incur
the 100ms sleep.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I779f023bb1681570da81c99cefa66debf3e1adc6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465711


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
parent 40b14690
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -401,6 +401,13 @@ function configure_linux {
			fi
		fi
	fi

	if [ ! -f /dev/cpu/0/msr ]; then
		# Some distros build msr as a module.  Make sure it's loaded to ensure
		#  DPDK can easily figure out the TSC rate rather than relying on 100ms
		#  sleeps.
		modprobe msr || true
	fi
}

function reset_linux_pci {