%{_datadir}/lustre
%{_sysconfdir}/udev/rules.d/99-lustre.rules
%config(noreplace) %{_sysconfdir}/ldev.conf
+%config(noreplace) %{_sysconfdir}/modprobe.d/ko2iblnd.conf
%if %{with lustre_modules}
%files modules
#
EXTRA_DIST = lustre.dtd slapd-lustre.conf lustre2ldif.xsl top.ldif \
- 99-lustre.rules lustre ldev.conf
+ 99-lustre.rules lustre ldev.conf ko2iblnd.conf
ldapconfdir = $(sysconfdir)/openldap
if UTILS
endif
endif
+modprobedir = $(sysconfdir)/modprobe.d
+modprobe_DATA = ko2iblnd.conf
+
sysconf_DATA = ldev.conf
--- /dev/null
+# Currently it isn't possible to auto-tune the o2iblnd parameters optimally
+# inside the kernel since the OFED API hides the details from us.
+# Unfortunately, there isn't a single set of parameters that provide optimal
+# performance on different HCA/HFI types, so this file provides optimized
+# tunables based on the installed IB interface cards.
+#
+# Card detection and tunable selection is handled via /usr/sbin/ko2iblnd-probe
+# at runtime when the ko2iblnd module is installed, either at boot or when
+# Lustre is first mounted.
+
+alias ko2iblnd-opa ko2iblnd
+options ko2iblnd-opa peer_credits=128 peer_credits_hiw=64 credits=1024 concurrent_sends=256 ntx=2048 map_on_demand=32 fmr_pool_size=2048 fmr_flush_trigger=512 fmr_cache=1
+
+install ko2iblnd /usr/sbin/ko2iblnd-probe
# These are scripts that are generated from .in files
genscripts = lc_modprobe lc_net lc_hb lc_cluman lc_md lc_lvm lustre_start
-sbin_SCRIPTS = lustre_rmmod
+sbin_SCRIPTS = lustre_rmmod ko2iblnd-probe
if RHEL
initdir = $(sysconfdir)/init.d
version_tag-none.pl lustre_rmmod ldev lc_mon lhbadm \
lc_servip lustre_routes_config lustre_routes_conversion \
$(addsuffix .in,$(genscripts)) lfs_migrate lustre_req_history \
- lustre lnet lc_common haconfig Lustre.ha_v2 dkms.mkconf zfsobj2fid
+ lustre lnet lc_common haconfig Lustre.ha_v2 dkms.mkconf \
+ zfsobj2fid ko2iblnd-probe
CLEANFILES = $(genscripts)
--- /dev/null
+#!/bin/sh
+
+# flags of IB devices which present
+HFI=0
+QIB=0
+
+# no profile name by default
+PROFILE=""
+
+INFINIBAND="/sys/class/infiniband"
+
+if [ -d $INFINIBAND ]; then
+ for dev in `ls -d $INFINIBAND/* | sed -e "s#^$INFINIBAND/##" -e 's#_[0-9]*$##'`; do
+ ver=`echo $dev | sed -ne 's#[^0-9]*##p'`
+ case $dev in
+ hfi*) HFI=1 ;;
+ qib*) QIB=1 ;;
+ esac
+ done
+
+ # Set profile name according priority
+ if [ $HFI -ne 0 ]; then
+ PROFILE="-opa"
+ elif [ $QIB -ne 0 ]; then
+ PROFILE="-opa"
+ fi
+fi
+
+exec /sbin/modprobe --ignore-install ko2iblnd$PROFILE $CMDLINE_OPTS