From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 01C9D138331 for ; Tue, 30 Jan 2018 19:31:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6F243E0C9F; Tue, 30 Jan 2018 19:31:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3E3B5E0C9F for ; Tue, 30 Jan 2018 19:31:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 91343335C70 for ; Tue, 30 Jan 2018 19:31:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 272101D9 for ; Tue, 30 Jan 2018 19:31:35 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1517340681.0d9c0f4a785d5021d3c01307388d0ecbf0f63cd4.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libomp/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/libomp/libomp-4.0.1.ebuild sys-libs/libomp/libomp-5.0.1.ebuild sys-libs/libomp/libomp-6.0.9999.ebuild sys-libs/libomp/libomp-9999.ebuild X-VCS-Directories: sys-libs/libomp/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 0d9c0f4a785d5021d3c01307388d0ecbf0f63cd4 X-VCS-Branch: master Date: Tue, 30 Jan 2018 19:31:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 48653412-a980-4a9c-99f3-ae5ab3a9b883 X-Archives-Hash: 12d18ea90a3a6ed4d1249d2401032887 commit: 0d9c0f4a785d5021d3c01307388d0ecbf0f63cd4 Author: Michał Górny gentoo org> AuthorDate: Tue Jan 30 19:29:00 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Jan 30 19:31:21 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d9c0f4a sys-libs/libomp: Perform PDS checks only for relevant kernel versions Update the PDS check logic to apply only when running the Linux kernel, versions between 4.13 and 4.15. That covers the range of -pf kernels that have the broken PDS version, and I think we can reasonably assume users will not be updating the patch along with the kernel. Also, perform the check only once in pkg_pretend. There is really no point in repeating it as packages do not alter kernel configuration. Closes: https://bugs.gentoo.org/638410 sys-libs/libomp/libomp-4.0.1.ebuild | 24 +++++++++++++++--------- sys-libs/libomp/libomp-5.0.1.ebuild | 24 +++++++++++++++--------- sys-libs/libomp/libomp-6.0.9999.ebuild | 24 +++++++++++++++--------- sys-libs/libomp/libomp-9999.ebuild | 24 +++++++++++++++--------- 4 files changed, 60 insertions(+), 36 deletions(-) diff --git a/sys-libs/libomp/libomp-4.0.1.ebuild b/sys-libs/libomp/libomp-4.0.1.ebuild index 9e63a216516..7b78f15ca8d 100644 --- a/sys-libs/libomp/libomp-4.0.1.ebuild +++ b/sys-libs/libomp/libomp-4.0.1.ebuild @@ -21,7 +21,7 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz" LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" SLOT="0" KEYWORDS="amd64 ~arm64 x86" -IUSE="hwloc ompt test" +IUSE="hwloc kernel_linux ompt test" RESTRICT="!test? ( test )" RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" @@ -42,22 +42,28 @@ S=${WORKDIR}/openmp-${PV/_/}.src # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo -CONFIG_CHECK="~!SCHED_PDS" -ERROR_SCHED_PDS="PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels ->= 4.13-pf11 < 4.14-pf9) do not implement sched_yield() call which -may result in horrible performance problems with libomp. If you are using one -of the specified kernel versions, you may want to disable the PDS scheduler." - python_check_deps() { has_version "dev-python/lit[${PYTHON_USEDEP}]" } +kernel_pds_check() { + if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then + local CONFIG_CHECK="~!SCHED_PDS" + local ERROR_SCHED_PDS="\ +PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 +< 4.14-pf9) do not implement sched_yield() call which may result in horrible +performance problems with libomp. If you are using one of the specified +kernel versions, you may want to disable the PDS scheduler." + + check_extra_config + fi +} + pkg_pretend() { - linux-info_pkg_setup + kernel_pds_check } pkg_setup() { - linux-info_pkg_setup use test && python-any-r1_pkg_setup } diff --git a/sys-libs/libomp/libomp-5.0.1.ebuild b/sys-libs/libomp/libomp-5.0.1.ebuild index c3c4114ff60..6c5b2b9c352 100644 --- a/sys-libs/libomp/libomp-5.0.1.ebuild +++ b/sys-libs/libomp/libomp-5.0.1.ebuild @@ -21,7 +21,7 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz" LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" SLOT="0" KEYWORDS="amd64 ~arm64 x86" -IUSE="hwloc ompt test" +IUSE="hwloc kernel_linux ompt test" RESTRICT="!test? ( test )" RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" @@ -42,22 +42,28 @@ S=${WORKDIR}/openmp-${PV/_/}.src # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo -CONFIG_CHECK="~!SCHED_PDS" -ERROR_SCHED_PDS="PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels ->= 4.13-pf11 < 4.14-pf9) do not implement sched_yield() call which -may result in horrible performance problems with libomp. If you are using one -of the specified kernel versions, you may want to disable the PDS scheduler." - python_check_deps() { has_version "dev-python/lit[${PYTHON_USEDEP}]" } +kernel_pds_check() { + if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then + local CONFIG_CHECK="~!SCHED_PDS" + local ERROR_SCHED_PDS="\ +PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 +< 4.14-pf9) do not implement sched_yield() call which may result in horrible +performance problems with libomp. If you are using one of the specified +kernel versions, you may want to disable the PDS scheduler." + + check_extra_config + fi +} + pkg_pretend() { - linux-info_pkg_setup + kernel_pds_check } pkg_setup() { - linux-info_pkg_setup use test && python-any-r1_pkg_setup } diff --git a/sys-libs/libomp/libomp-6.0.9999.ebuild b/sys-libs/libomp/libomp-6.0.9999.ebuild index 30de17ed6c2..01d1bd791b8 100644 --- a/sys-libs/libomp/libomp-6.0.9999.ebuild +++ b/sys-libs/libomp/libomp-6.0.9999.ebuild @@ -24,7 +24,7 @@ EGIT_BRANCH="release_60" LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" SLOT="0" KEYWORDS="" -IUSE="cuda hwloc offload ompt test" +IUSE="cuda hwloc kernel_linux offload ompt test" # CUDA works only with the x86_64 ABI REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )" RESTRICT="!test? ( test )" @@ -51,22 +51,28 @@ DEPEND="${RDEPEND} # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo -CONFIG_CHECK="~!SCHED_PDS" -ERROR_SCHED_PDS="PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels ->= 4.13-pf11 < 4.14-pf9) do not implement sched_yield() call which -may result in horrible performance problems with libomp. If you are using one -of the specified kernel versions, you may want to disable the PDS scheduler." - python_check_deps() { has_version "dev-python/lit[${PYTHON_USEDEP}]" } +kernel_pds_check() { + if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then + local CONFIG_CHECK="~!SCHED_PDS" + local ERROR_SCHED_PDS="\ +PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 +< 4.14-pf9) do not implement sched_yield() call which may result in horrible +performance problems with libomp. If you are using one of the specified +kernel versions, you may want to disable the PDS scheduler." + + check_extra_config + fi +} + pkg_pretend() { - linux-info_pkg_setup + kernel_pds_check } pkg_setup() { - linux-info_pkg_setup use test && python-any-r1_pkg_setup } diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild index 08c180ec179..75dd8476fff 100644 --- a/sys-libs/libomp/libomp-9999.ebuild +++ b/sys-libs/libomp/libomp-9999.ebuild @@ -23,7 +23,7 @@ EGIT_REPO_URI="https://git.llvm.org/git/openmp.git LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" SLOT="0" KEYWORDS="" -IUSE="cuda hwloc offload ompt test" +IUSE="cuda hwloc kernel_linux offload ompt test" # CUDA works only with the x86_64 ABI REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )" RESTRICT="!test? ( test )" @@ -50,22 +50,28 @@ DEPEND="${RDEPEND} # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo -CONFIG_CHECK="~!SCHED_PDS" -ERROR_SCHED_PDS="PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels ->= 4.13-pf11 < 4.14-pf9) do not implement sched_yield() call which -may result in horrible performance problems with libomp. If you are using one -of the specified kernel versions, you may want to disable the PDS scheduler." - python_check_deps() { has_version "dev-python/lit[${PYTHON_USEDEP}]" } +kernel_pds_check() { + if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then + local CONFIG_CHECK="~!SCHED_PDS" + local ERROR_SCHED_PDS="\ +PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 +< 4.14-pf9) do not implement sched_yield() call which may result in horrible +performance problems with libomp. If you are using one of the specified +kernel versions, you may want to disable the PDS scheduler." + + check_extra_config + fi +} + pkg_pretend() { - linux-info_pkg_setup + kernel_pds_check } pkg_setup() { - linux-info_pkg_setup use test && python-any-r1_pkg_setup }