From f269497ac7a730880e590eb9e8405f082522c5e0 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Fri, 4 Jun 2021 00:37:18 -0700 Subject: [PATCH] LU-14690 kernel: new kernel [RHEL 8.4 4.18.0-305.3.1.el8_4] This patch makes changes to support new RHEL 8.4 release for Lustre client. Test-Parameters: trivial clientdistro=el8.4 Change-Id: I47d4706f9175d489ef0e6226492af20f44f0677e Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/43725 Tested-by: jenkins Reviewed-by: Yang Sheng Tested-by: Maloo Reviewed-by: Minh Diep Reviewed-by: Olaf Faaland-LLNL Reviewed-by: Aurelien Degremont Reviewed-by: Oleg Drokin --- libcfs/autoconf/lustre-libcfs.m4 | 43 ++++++++++++++++++++++ libcfs/include/libcfs/linux/linux-net.h | 4 ++ lustre/ChangeLog | 1 + lustre/autoconf/lustre-core.m4 | 1 + .../kernel_patches/targets/4.18-rhel8.4.target.in | 26 +++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 lustre/kernel_patches/targets/4.18-rhel8.4.target.in diff --git a/libcfs/autoconf/lustre-libcfs.m4 b/libcfs/autoconf/lustre-libcfs.m4 index 5f37d5b..6ff7aa3 100644 --- a/libcfs/autoconf/lustre-libcfs.m4 +++ b/libcfs/autoconf/lustre-libcfs.m4 @@ -1149,6 +1149,46 @@ clear_and_wake_up_bit, [ ]) # LIBCFS_CLEAR_AND_WAKE_UP_BIT # +# LIBCFS_TCP_SOCK_SET_NODELAY +# +# kernel 4.18.0-293.el8 +# tcp_sock_set_nodelay() was added +AC_DEFUN([LIBCFS_TCP_SOCK_SET_NODELAY], [ +tmp_flags="$EXTRA_KCFLAGS" +EXTRA_KCFLAGS="-Werror" +LB_CHECK_COMPILE([if 'tcp_sock_set_nodelay()' exists], +tcp_sock_set_nodelay_exists, [ + #include +],[ + tcp_sock_set_nodelay(NULL); +],[ + AC_DEFINE(HAVE_TCP_SOCK_SET_NODELAY, 1, + ['tcp_sock_set_nodelay()' exists]) +]) +EXTRA_KCFLAGS="$tmp_flags" +]) # LIBCFS_TCP_SOCK_SET_NODELAY + +# +# LIBCFS_TCP_SOCK_SET_KEEPIDLE +# +# kernel 4.18.0-293.el8 +# tcp_sock_set_keepidle() was added +AC_DEFUN([LIBCFS_TCP_SOCK_SET_KEEPIDLE], [ +tmp_flags="$EXTRA_KCFLAGS" +EXTRA_KCFLAGS="-Werror" +LB_CHECK_COMPILE([if 'tcp_sock_set_keepidle()' exists], +tcp_sock_set_keepidle_exists, [ + #include +],[ + tcp_sock_set_keepidle(NULL, 0); +],[ + AC_DEFINE(HAVE_TCP_SOCK_SET_KEEPIDLE, 1, + ['tcp_sock_set_keepidle()' exists]) +]) +EXTRA_KCFLAGS="$tmp_flags" +]) # LIBCFS_TCP_SOCK_SET_KEEPIDLE + +# # LIBCFS_XARRAY_SUPPORT # # 4.19-rc5 kernel commit 3159f943aafdbacb2f94c38fdaadabf2bbde2a14 @@ -1544,6 +1584,9 @@ LIBCFS_WAIT_VAR_EVENT # 4.17 LIBCFS_BITMAP_ALLOC LIBCFS_CLEAR_AND_WAKE_UP_BIT +# 4.18 +LIBCFS_TCP_SOCK_SET_NODELAY +LIBCFS_TCP_SOCK_SET_KEEPIDLE # 4.19 LIBCFS_XARRAY_SUPPORT # 4.20 diff --git a/libcfs/include/libcfs/linux/linux-net.h b/libcfs/include/libcfs/linux/linux-net.h index 41484bd..98951f7 100644 --- a/libcfs/include/libcfs/linux/linux-net.h +++ b/libcfs/include/libcfs/linux/linux-net.h @@ -35,6 +35,7 @@ static inline void tcp_sock_set_quickack(struct sock *sk, int opt) (char *)&opt, sizeof(opt)); } +#if !defined(HAVE_TCP_SOCK_SET_NODELAY) static inline void tcp_sock_set_nodelay(struct sock *sk) { int opt = 1; @@ -43,7 +44,9 @@ static inline void tcp_sock_set_nodelay(struct sock *sk) kernel_setsockopt(sock, SOL_TCP, TCP_NODELAY, (char *)&opt, sizeof(opt)); } +#endif /* HAVE_TCP_SOCK_SET_NODELAY */ +#if !defined(HAVE_TCP_SOCK_SET_KEEPIDLE) static inline int tcp_sock_set_keepidle(struct sock *sk, int opt) { struct socket *sock = sk->sk_socket; @@ -51,6 +54,7 @@ static inline int tcp_sock_set_keepidle(struct sock *sk, int opt) return kernel_setsockopt(sock, SOL_TCP, TCP_KEEPIDLE, (char *)&opt, sizeof(opt)); } +#endif /* HAVE_TCP_SOCK_SET_KEEPIDLE */ static inline int tcp_sock_set_keepintvl(struct sock *sk, int opt) { diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 6dc159c..91d220a 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -38,6 +38,7 @@ TBD Whamcloud 4.18.0-147.8.1.el8 (RHEL8.1) 4.18.0-193.28.1.el8 (RHEL8.2) 4.18.0-240.22.1.el8 (RHEL8.3) + 4.18.0-305.3.1.el8 (RHEL8.4) 4.4.120-92.70 (SLES12 SP2) 4.4.180-94.100 (SLES12 SP3) 4.4.0-131 (Ubuntu 16.04) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 0c6643b..8598f26 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -2953,6 +2953,7 @@ lustre/doc/Makefile lustre/include/Makefile lustre/include/lustre/Makefile lustre/include/uapi/linux/lustre/Makefile +lustre/kernel_patches/targets/4.18-rhel8.4.target lustre/kernel_patches/targets/4.18-rhel8.3.target lustre/kernel_patches/targets/4.18-rhel8.2.target lustre/kernel_patches/targets/4.18-rhel8.1.target diff --git a/lustre/kernel_patches/targets/4.18-rhel8.4.target.in b/lustre/kernel_patches/targets/4.18-rhel8.4.target.in new file mode 100644 index 0000000..d28a956 --- /dev/null +++ b/lustre/kernel_patches/targets/4.18-rhel8.4.target.in @@ -0,0 +1,26 @@ +lnxmaj="4.18.0" +lnxrel="305.3.1.el8_4" + +KERNEL_SRPM=kernel-${lnxmaj}-${lnxrel}.src.rpm +SERIES="" +EXTRA_VERSION=${lnxrel}_lustre.@VERSION@ +LUSTRE_VERSION=@VERSION@ + +DEVEL_PATH_ARCH_DELIMETER="." +OFED_VERSION=inkernel + +BASE_ARCHS="i686 x86_64 ia64 ppc64" +BIGMEM_ARCHS="" +BOOT_ARCHS="" +JENSEN_ARCHS="" +#SMP_ARCHS="i686 x86_64 ia64 ppc64" +# RHEL8 doesn't use smp specific kernels +SMP_ARCHS="" +UP_ARCHS="" + +for cc in gcc ; do + if which $cc >/dev/null 2>/dev/null ; then + export CC=$cc + break + fi +done -- 1.8.3.1