sys-libs/libomp: Disallow kernels with PDU scheduler
authorMichał Górny <mgorny@gentoo.org>
Sat, 30 Dec 2017 22:30:29 +0000 (23:30 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sat, 30 Dec 2017 22:43:39 +0000 (23:43 +0100)
The PDU scheduler (used e.g. in current versions of -pf kernel) does not
implement the sched_yield() call which is used by the OpenMP
implementation to switch between threads. As a result, using OpenMP with
this scheduler results in horrible performance with 100% CPU usage
on looped noop syscall calls.

Closes: https://bugs.gentoo.org/638410

sys-libs/libomp/libomp-4.0.1.ebuild
sys-libs/libomp/libomp-5.0.0.ebuild
sys-libs/libomp/libomp-5.0.1.ebuild
sys-libs/libomp/libomp-9999.ebuild

index 2eed580030c3c5d364c5f22bf838717812590b10..299e49921e10a0bd1bf77cbbabc2d3ddb26c3e5a 100644 (file)
@@ -8,7 +8,7 @@ EAPI=6
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python2_7 )
 
-inherit cmake-multilib python-any-r1
+inherit cmake-multilib linux-info python-any-r1
 
 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
 HOMEPAGE="https://openmp.llvm.org"
@@ -22,8 +22,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
 SLOT="0"
 KEYWORDS="amd64 ~arm64 x86"
 IUSE="hwloc ompt test"
-# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410
-RESTRICT="test"
+RESTRICT="!test? ( test )"
 
 RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
 # tests:
@@ -43,11 +42,19 @@ S=${WORKDIR}/openmp-${PV/_/}.src
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
+CONFIG_CHECK="~!SCHED_PDS"
+ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()"
+
 python_check_deps() {
        has_version "dev-python/lit[${PYTHON_USEDEP}]"
 }
 
+pkg_pretend() {
+       linux-info_pkg_setup
+}
+
 pkg_setup() {
+       linux-info_pkg_setup
        use test && python-any-r1_pkg_setup
 }
 
index f90baa29e6651ccf7774bd1f6600ab75105a3caf..87c3bfe493f668d1c11ecc859db5a1669e9668e6 100644 (file)
@@ -8,7 +8,7 @@ EAPI=6
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python2_7 )
 
-inherit cmake-multilib python-any-r1
+inherit cmake-multilib linux-info python-any-r1
 
 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
 HOMEPAGE="https://openmp.llvm.org"
@@ -22,8 +22,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86"
 IUSE="hwloc ompt test"
-# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410
-RESTRICT="test"
+RESTRICT="!test? ( test )"
 
 RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
 # tests:
@@ -43,11 +42,19 @@ S=${WORKDIR}/openmp-${PV/_/}.src
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
+CONFIG_CHECK="~!SCHED_PDS"
+ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()"
+
 python_check_deps() {
        has_version "dev-python/lit[${PYTHON_USEDEP}]"
 }
 
+pkg_pretend() {
+       linux-info_pkg_setup
+}
+
 pkg_setup() {
+       linux-info_pkg_setup
        use test && python-any-r1_pkg_setup
 }
 
index f90baa29e6651ccf7774bd1f6600ab75105a3caf..87c3bfe493f668d1c11ecc859db5a1669e9668e6 100644 (file)
@@ -8,7 +8,7 @@ EAPI=6
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python2_7 )
 
-inherit cmake-multilib python-any-r1
+inherit cmake-multilib linux-info python-any-r1
 
 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
 HOMEPAGE="https://openmp.llvm.org"
@@ -22,8 +22,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86"
 IUSE="hwloc ompt test"
-# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410
-RESTRICT="test"
+RESTRICT="!test? ( test )"
 
 RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
 # tests:
@@ -43,11 +42,19 @@ S=${WORKDIR}/openmp-${PV/_/}.src
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
+CONFIG_CHECK="~!SCHED_PDS"
+ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()"
+
 python_check_deps() {
        has_version "dev-python/lit[${PYTHON_USEDEP}]"
 }
 
+pkg_pretend() {
+       linux-info_pkg_setup
+}
+
 pkg_setup() {
+       linux-info_pkg_setup
        use test && python-any-r1_pkg_setup
 }
 
index 6b0c0b5b801418fed99b3cf1a4d75e9690ee7c56..4d590521516445adaedc04c746fbe676d20f0e4e 100644 (file)
@@ -8,7 +8,7 @@ EAPI=6
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python2_7 )
 
-inherit cmake-multilib git-r3 python-any-r1
+inherit cmake-multilib git-r3 linux-info python-any-r1
 
 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
 HOMEPAGE="https://openmp.llvm.org"
@@ -24,8 +24,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
 SLOT="0"
 KEYWORDS=""
 IUSE="hwloc ompt test"
-# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410
-RESTRICT="test !test? ( test )"
+RESTRICT="!test? ( test )"
 
 RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
 # tests:
@@ -43,11 +42,19 @@ DEPEND="${RDEPEND}
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
+CONFIG_CHECK="~!SCHED_PDS"
+ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()"
+
 python_check_deps() {
        has_version "dev-python/lit[${PYTHON_USEDEP}]"
 }
 
+pkg_pretend() {
+       linux-info_pkg_setup
+}
+
 pkg_setup() {
+       linux-info_pkg_setup
        use test && python-any-r1_pkg_setup
 }