From 0a4c9ccb49bc75530085f2f2e5bac8c7a7e0ce95 Mon Sep 17 00:00:00 2001 From: Phil Cayton Date: Wed, 6 Aug 2014 13:28:07 -0700 Subject: [PATCH] add xeon-phi as tech preview --- .gitignore | 6 + compat-rdma.spec | 75 +- configure | 62 + makefile | 3 + ofed_scripts/ib_sdp.conf | 2 + ofed_scripts/ibscif-opt | 145 + ofed_scripts/ibscif.conf | 14 + ofed_scripts/ipoib.conf | 17 + ofed_scripts/ofed-mic | 297 + ofed_scripts/ofed.conf | 2 + ofed_scripts/ofed.filelist | 5 + ofed_scripts/openibd | 20 +- ofed_scripts/truescale.cmds | 94 + ...dd-mic-node-and-scif-transport-types.patch | 92 + ...dd-mic-node-and-scif-transport-types.patch | 124 + ...0003-add-context-based-udata-support.patch | 98 + .../0004-add-context-based-umem-support.patch | 391 + .../0005-allow-mic-ipoib-qp-creation.patch | 101 + ...e-include-directory-matching-the-loc.patch | 1769 +++ ...CCL-Direct-ibp-drivers-to-Infiniband.patch | 9479 +++++++++++++++++ ...bscif-to-the-Infiniband-HW-directory.patch | 9130 ++++++++++++++++ ...nfiniband-s-Kconfig-and-Makefile-to-.patch | 42 + ...0010-Update-qib-for-XEON-PHI-support.patch | 1980 ++++ ...-correct-ib_addr.h-for-older-kernels.patch | 53 + ...-locking-already-done-in-event-handl.patch | 46 + 25 files changed, 24045 insertions(+), 2 deletions(-) create mode 100644 ofed_scripts/ib_sdp.conf create mode 100644 ofed_scripts/ibscif-opt create mode 100644 ofed_scripts/ibscif.conf create mode 100644 ofed_scripts/ipoib.conf create mode 100644 ofed_scripts/ofed-mic create mode 100644 ofed_scripts/ofed.conf create mode 100644 ofed_scripts/ofed.filelist create mode 100644 tech-preview/xeon-phi/0001-ib_core-add-mic-node-and-scif-transport-types.patch create mode 100644 tech-preview/xeon-phi/0002-rdma_cm-add-mic-node-and-scif-transport-types.patch create mode 100644 tech-preview/xeon-phi/0003-add-context-based-udata-support.patch create mode 100644 tech-preview/xeon-phi/0004-add-context-based-umem-support.patch create mode 100644 tech-preview/xeon-phi/0005-allow-mic-ipoib-qp-creation.patch create mode 100644 tech-preview/xeon-phi/0006-add-scif.h-to-the-include-directory-matching-the-loc.patch create mode 100644 tech-preview/xeon-phi/0007-add-CCL-Direct-ibp-drivers-to-Infiniband.patch create mode 100644 tech-preview/xeon-phi/0008-Add-ibscif-to-the-Infiniband-HW-directory.patch create mode 100644 tech-preview/xeon-phi/0009-update-drivers-infiniband-s-Kconfig-and-Makefile-to-.patch create mode 100644 tech-preview/xeon-phi/0010-Update-qib-for-XEON-PHI-support.patch create mode 100644 tech-preview/xeon-phi/0011-correct-ib_addr.h-for-older-kernels.patch create mode 100644 tech-preview/xeon-phi/0012-add-mlx4-cq_comp-locking-already-done-in-event-handl.patch diff --git a/.gitignore b/.gitignore index 1ad998b..af870da 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,9 @@ module.order code-metrics.txt compat_base_tree compat_base_tree_version +compat/ +compat_base +compat_version +docs/ +include/ +udev/ diff --git a/compat-rdma.spec b/compat-rdma.spec index 28af9ec..480c06d 100755 --- a/compat-rdma.spec +++ b/compat-rdma.spec @@ -38,6 +38,11 @@ %{!?build_kernel_ib: %define build_kernel_ib 0} %{!?build_kernel_ib_devel: %define build_kernel_ib_devel 0} +# Set default to use scif.h and scif symvers from MPSS installation +# Use the release-3.x paths +%{!?scif_h: %define scif_h %(echo -n '/usr/src/kernels/%{KVERSION}/include/modules/scif.h')} +%{!?scif_symvers: %define scif_symvers %(echo -n '/lib/modules/%{KVERSION}/scif.symvers')} + # Select packages to build %{!?modprobe_update: %define modprobe_update %(if ( echo %{configure_options} | grep "without-modprobe" > /dev/null ); then echo -n '0'; else echo -n '1'; fi)} @@ -62,6 +67,8 @@ %define build_qlgc_vnic %(if ( echo %{configure_options} | grep "with-qlgc_vnic-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi) %define build_nfsrdma %(if ( echo %{configure_options} | grep "with-nfsrdma-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi) %define build_ocrdma %(if ( echo %{configure_options} | grep "with-ocrdma-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi) +%define build_ibp_server %(if ( echo %{configure_options} | grep "with-ibp-server-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi) +%define build_ibscif %(if ( echo %{configure_options} | grep "with-ibscif-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi) %{!?LIB_MOD_DIR: %define LIB_MOD_DIR /lib/modules/%{KVERSION}/updates} @@ -147,7 +154,13 @@ cp -a $RPM_BUILD_DIR/%{_name}-%{_version}/config.mk $RPM_BUILD_DIR/src/%{_name} sed -i -e "s@\${CWD}@%{_prefix}/src/%{_name}@g" $RPM_BUILD_DIR/src/%{_name}/config.mk %endif + %if %{build_kernel_ib} +%if %{build_ibp_server} || %{build_ibscif} || %{build_qib} +test ! -d ./include/modules && mkdir ./include/modules +test -f %{scif_h} && cp %{scif_h} ./include/modules +test -f %{scif_symvers} && cat %{scif_symvers} >> ./Module.symvers +%endif %if %{build_srpt} if [ -f /usr/local/include/scst/Module.symvers ]; then cat /usr/local/include/scst/Module.symvers >> ./Module.symvers @@ -210,9 +223,21 @@ chmod +x ${INFO} > /dev/null 2>&1 install -d $RPM_BUILD_ROOT/%{RDMA_CONF_DIR} install -m 0644 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/openib.conf $RPM_BUILD_ROOT/%{RDMA_CONF_DIR} +%if %{build_ibp_server} || %{build_ibscif} +# install overlay files and config +install -D -m 0644 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/ofed.conf $RPM_BUILD_ROOT/etc/mpss/conf.d/ofed.conf +install -D -m 0644 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/ofed.filelist $RPM_BUILD_ROOT/opt/intel/mic/ofed/ofed.filelist +%endif + # Install openib service script install -d $RPM_BUILD_ROOT/etc/init.d install -m 0755 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/openibd $RPM_BUILD_ROOT/etc/init.d + +%if %{build_ibp_server} || %{build_ibscif} +# Also install ofed-mic script in init.d +install -m 0755 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/ofed-mic $RPM_BUILD_ROOT/etc/init.d +%endif + install -d $RPM_BUILD_ROOT/sbin install -m 0755 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/sysctl_perf_tuning $RPM_BUILD_ROOT/sbin @@ -227,6 +252,13 @@ install -m 0755 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/connectx_port_c touch $RPM_BUILD_ROOT/%{RDMA_CONF_DIR}/connectx.conf %endif +%if %{build_ibp_server} || %{build_ibscif} +install -d $RPM_BUILD_ROOT/etc/modprobe.d +install -m 0644 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/ibscif.conf $RPM_BUILD_ROOT/etc/modprobe.d/ +install -d $RPM_BUILD_ROOT/usr/sbin +install -m 0755 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/ibscif-opt $RPM_BUILD_ROOT/usr/sbin +%endif + %if %{build_qib} install -m 0644 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/truescale.cmds $RPM_BUILD_ROOT/%{RDMA_CONF_DIR} %endif @@ -236,6 +268,11 @@ install -m 0644 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/truescale.cmds install -d $RPM_BUILD_ROOT/etc/modprobe.d install -m 0644 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/ib_ipoib.conf $RPM_BUILD_ROOT/etc/modprobe.d %endif +%if %{build_ibp_server} || %{build_ibscif} +install -d $RPM_BUILD_ROOT/etc/sysconfig/mic +install -D -m 0644 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/ipoib.conf $RPM_BUILD_ROOT/etc/mpss/ipoib.conf +install -D -m 0644 $RPM_BUILD_DIR/%{_name}-%{_version}/docs/lustre-phi.txt $RPM_BUILD_ROOT/usr/share/doc/%{_name}-%{_version}/lustre-phi.txt +%endif %endif %if %{build_sdp} @@ -350,6 +387,15 @@ perl -i -ne 'if (m@^#!/bin/bash@) { if ! ( /sbin/chkconfig --add openibd > /dev/null 2>&1 ); then true fi + + if [ -x /etc/init.d/ofed-mic ]; then + if ! ( /sbin/chkconfig --del ofed-mic > /dev/null 2>&1 ); then + true + fi + if ! ( /sbin/chkconfig --add ofed-mic && /sbin/chkconfig ofed-mic off > /dev/null 2>&1 ); then + true + fi + fi fi if [ -f /etc/SuSE-release ]; then @@ -548,11 +594,21 @@ if [ $1 = 0 ]; then # 1 : Erase, not upgrade if ! ( /sbin/chkconfig --del openibd > /dev/null 2>&1 ); then true fi + if [ -x /etc/init.d/ofed-mic ]; then + if ! ( /sbin/chkconfig --del ofed-mic > /dev/null 2>&1 ); then + true + fi + fi fi if [ -f /etc/SuSE-release ]; then if ! ( /sbin/insserv -r openibd > /dev/null 2>&1 ); then true fi + if [ -x /etc/init.d/ofed-mic ]; then + if ! ( /sbin/insserv -r ofed-mic > /dev/null 2>&1 ); then + true + fi + fi fi if [ -f /etc/debian_version ]; then if ! ( /usr/sbin/update-rc.d openibd remove > /dev/null 2>&1 ); then @@ -587,6 +643,12 @@ fi %defattr(-,root,root,-) %dir %{RDMA_CONF_DIR} %config(noreplace) %{RDMA_CONF_DIR}/openib.conf +%if %{build_ibp_server} || %{build_ibscif} +%config %{_sysconfdir}/init.d/ofed-mic +%config %{_sysconfdir}/mpss/conf.d/ofed.conf +%dir /opt/intel/mic/ofed +/opt/intel/mic/ofed/* +%endif %{RDMA_CONF_DIR}/info /etc/init.d/openibd /sbin/sysctl_perf_tuning @@ -597,10 +659,19 @@ fi %if %{build_qib} %config(noreplace) %{RDMA_CONF_DIR}/truescale.cmds %endif +%if %{build_ibp_server} || %{build_ibscif} +%if %{modprobe_update} +%config(noreplace) %{_sysconfdir}/modprobe.d/ibscif.conf +%endif +%endif %if %{build_ipoib} %if %{modprobe_update} /etc/modprobe.d/ib_ipoib.conf %endif +%if %{build_ibp_server} || %{build_ibscif} +%config(noreplace) %{_sysconfdir}/mpss/ipoib.conf +/usr/share/doc/%{_name}-%{_version}/lustre-phi.txt +%endif %endif %if %{build_sdp} %if %{modprobe_update} @@ -623,6 +694,8 @@ fi %{_prefix}/src/openib %changelog +* Wed Jul 06 2014 Jay Sternberg , Phil Cayton +- Add Tech Preview for Xeon-Phi + * Thu Feb 16 2012 Vladimir Sokolovsky - Created spec file for compat-rdma -r compat-rdma diff --git a/configure b/configure index 36c1634..4d1e513 100755 --- a/configure +++ b/configure @@ -115,6 +115,12 @@ Usage: `basename $0` [options] --with-mlx5_debug-mod make CONFIG_MLX5_DEBUG=y [yes] --without-mlx5_debug-mod [no] + --with-xeon-phi-mod make CONFIG_IBP_SERVER=m CONFIG_INFINIBAND_SCIF=m [no] + --without-xeon-phi-mod [yes] + + --with-xeon-phi-debug-mod make CONFIG_IBP_DEBUG=y [no] + --without-xeon-phi-debug-mod [yes] + --with-ipath_inf-mod make CONFIG_INFINIBAND_IPATH=m [no] --without-ipath_inf-mod [yes] @@ -488,6 +494,15 @@ main() --without-mlx5_debug-mod) CONFIG_MLX5_DEBUG= ;; + --with-ibscif-mod) + CONFIG_INFINIBAND_SCIF="m" + ;; + --with-ibp-server-mod) + CONFIG_IBP_SERVER="m" + ;; + --with-ibp=server-debug-mod) + CONFIG_IBP_DEBUG="y" + ;; --with-ipath_inf-mod) CONFIG_INFINIBAND_IPATH="m" ;; @@ -697,6 +712,11 @@ CONFIG_MLX5_INFINIBAND=${CONFIG_MLX5_INFINIBAND:-''} CONFIG_MLX4_DEBUG=${CONFIG_MLX4_DEBUG:-''} CONFIG_MLX5_DEBUG=${CONFIG_MLX4_DEBUG:-''} +CONFIG_IBP_SERVER=${CONFIG_IBP_SERVER:-''} +CONFIG_IBP_DEBUG=${CONFIG_IBP_DEBUG:-''} + +CONFIG_INFINIBAND_SCIF=${CONFIG_INFINIBAND_SCIF:-''} + CONFIG_INFINIBAND_IPOIB_DEBUG=${CONFIG_INFINIBAND_IPOIB_DEBUG:-''} CONFIG_INFINIBAND_ISER=${CONFIG_INFINIBAND_ISER:-''} CONFIG_SCSI_ISCSI_ATTRS=${CONFIG_SCSI_ISCSI_ATTRS:-''} @@ -774,6 +794,12 @@ fi ex ${CWD}/ofed_scripts/ofed_patch.sh ${ofed_patch_params} fi + if [[ ! -e .xeon_phi_applied && "X$CONFIG_IBP_SERVER" == "Xm" ]]; then + echo ".xeon_phi_applied does not exist. running ofed-patch.sh for xeon-phi" + ex ${CWD}/ofed_scripts/ofed_patch.sh --with-patchdir=tech-preview/xeon-phi + touch .xeon_phi_applied + fi + # Create configure.mk /bin/rm -f ${CWD}/${CONFIG} cat >> ${CWD}/${CONFIG} << EOFCONFIG @@ -815,6 +841,12 @@ CONFIG_MLX4_INFINIBAND=${CONFIG_MLX4_INFINIBAND} CONFIG_MLX5_INFINIBAND=${CONFIG_MLX5_INFINIBAND} CONFIG_MLX4_DEBUG=${CONFIG_MLX4_DEBUG} CONFIG_MLX5_DEBUG=${CONFIG_MLX5_DEBUG} + +CONFIG_IBP_SERVER=${CONFIG_IBP_SERVER} +CONFIG_IBP_DEBUG=${CONFIG_IBP_DEBUG} + +CONFIG_INFINIBAND_SCIF=${CONFIG_INFINIBAND_SCIF} + CONFIG_INFINIBAND_IPOIB_DEBUG=${CONFIG_INFINIBAND_IPOIB_DEBUG} CONFIG_INFINIBAND_ISER=${CONFIG_INFINIBAND_ISER} CONFIG_SCSI_ISCSI_ATTRS=${CONFIG_SCSI_ISCSI_ATTRS} @@ -989,6 +1021,21 @@ if [ "X${CONFIG_MLX5_DEBUG}" == "Xy" ]; then else DEFINE_MLX5_DEBUG="#undef CONFIG_MLX5_DEBUG" fi +if [ "X${CONFIG_IBP_SERVER}" == "Xm" ]; then + DEFINE_IBP_SERVER="#undef CONFIG_IBP_SERVER\n#define CONFIG_IBP_SERVER 1" +else + DEFINE_IBP_SERVER="#undef CONFIG_IBP_SERVER" +fi +if [ "X${CONFIG_IBP_DRV_DEBUG}" == "Xy" ]; then + DEFINE_IBP_DEBUG="#undef CONFIG_IBP_DEBUG\n#define CONFIG_IBP_DEBUG 1" +else + DEFINE_IBP_DEBUG="#undef CONFIG_IBP_DEBUG" +fi +if [ "X${CONFIG_INFINIBAND_SCIF}" == "Xm" ]; then + DEFINE_INFINIBAND_SCIF="#undef CONFIG_INFINIBAND_SCIF\n#define CONFIG_INFINIBAND_SCIF 1" +else + DEFINE_INFINIBAND_SCIF="#undef CONFIG_INFINIBAND_SCIF" +fi if [ "X${CONFIG_INFINIBAND_IPOIB_DEBUG}" == "Xy" ]; then DEFINE_INFINIBAND_IPOIB_DEBUG="#undef CONFIG_INFINIBAND_IPOIB_DEBUG\n#define CONFIG_INFINIBAND_IPOIB_DEBUG 1" else @@ -1258,6 +1305,11 @@ $(echo -e "${DEFINE_MLX4_ETHERNET}" | grep -v undef) $(echo -e "${DEFINE_MLX4_DEBUG}" | grep -v undef) $(echo -e "${DEFINE_MLX5_DEBUG}" | grep -v undef) +$(echo -e "${DEFINE_IBP_SERVER}" | grep -v undef) +$(echo -e "${DEFINE_IBP_DEBUG}" | grep -v undef) + +$(echo -e "${DEFINE_INFINIBAND_SCIF}" | grep -v undef) + $(echo -e "${DEFINE_INFINIBAND_IPOIB_DEBUG_DATA}" | grep -v undef) $(echo -e "${DEFINE_INFINIBAND_SDP_SEND_ZCOPY}" | grep -v undef) $(echo -e "${DEFINE_INFINIBAND_SDP_RECV_ZCOPY}" | grep -v undef) @@ -1294,6 +1346,11 @@ $(echo -e "${DEFINE_INFINIBAND_AMSO1100}" | grep -v undef) #undef CONFIG_MLX4_INFINIBAND #undef CONFIG_MLX5_INFINIBAND +#undef CONFIG_IBP_SERVER +#undef CONFIG_IBP_DEBUG + +#undef CONFIG_INFINIBAND_SCIF + #undef CONFIG_INFINIBAND_IPOIB_DEBUG #undef CONFIG_INFINIBAND_ISER #undef CONFIG_INFINIBAND_EHCA @@ -1414,6 +1471,11 @@ $(echo -e "${DEFINE_MLX4_ETHERNET}") $(echo -e "${DEFINE_MLX4_DEBUG}") $(echo -e "${DEFINE_MLX5_DEBUG}") +$(echo -e "${DEFINE_IBP_SERVER}") +$(echo -e "${DEFINE_IBP_DEBUG}") + +$(echo -e "${DEFINE_INFINIBAND_SCIF}") + $(echo -e "${DEFINE_INFINIBAND_IPOIB_DEBUG_DATA}") $(echo -e "${DEFINE_INFINIBAND_SDP_SEND_ZCOPY}") $(echo -e "${DEFINE_INFINIBAND_SDP_RECV_ZCOPY}") diff --git a/makefile b/makefile index f5b9d5b..19d37c3 100644 --- a/makefile +++ b/makefile @@ -128,6 +128,9 @@ kernel: $(COMPAT_CONFIG) $(COMPAT_AUTOCONF) CONFIG_MLX4_ETHERNET=$(CONFIG_MLX4_ETHERNET) \ CONFIG_MLX4_DEBUG=$(CONFIG_MLX4_DEBUG) \ CONFIG_MLX5_DEBUG=$(CONFIG_MLX5_DEBUG) \ + CONFIG_IBP_SERVER=$(CONFIG_IBP_SERVER) \ + CONFIG_IBP_DEBUG=$(CONFIG_IBP_DEBUG) \ + CONFIG_INFINIBAND_SCIF=$(CONFIG_INFINIBAND_SCIF) \ CONFIG_INFINIBAND_AMSO1100=$(CONFIG_INFINIBAND_AMSO1100) \ CONFIG_SUNRPC_XPRT_RDMA=$(CONFIG_SUNRPC_XPRT_RDMA) \ CONFIG_NFSD_RDMA=$(CONFIG_NFSD_RDMA) \ diff --git a/ofed_scripts/ib_sdp.conf b/ofed_scripts/ib_sdp.conf new file mode 100644 index 0000000..fa4720b --- /dev/null +++ b/ofed_scripts/ib_sdp.conf @@ -0,0 +1,2 @@ +alias net-pf-27 ib_sdp +alias net-pf-28 ib_sdp diff --git a/ofed_scripts/ibscif-opt b/ofed_scripts/ibscif-opt new file mode 100644 index 0000000..8ce8ebd --- /dev/null +++ b/ofed_scripts/ibscif-opt @@ -0,0 +1,145 @@ +#!/bin/bash +###################################################################### +# +# ibscif-opt +# +# Read or set the options of the ibscif kernel module. +# The operation is applied to the host as well as all the +# active MIC cards. +# +# To read the options, run without any argument. +# To set the options, run with a list of