summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-12-30 23:30:29 +0100
committerMichał Górny <mgorny@gentoo.org>2017-12-30 23:43:39 +0100
commit635af6abf583f1e17860c0eb72cfe74b474bdfdf (patch)
tree240a1623e33f798827bd67d9117b1a80e43f36c9 /sys-libs
parentapp-text/pdf2htmlEX: Enforce building without PIE, bug 642210 (diff)
downloadgentoo-635af6abf583f1e17860c0eb72cfe74b474bdfdf.tar.gz
gentoo-635af6abf583f1e17860c0eb72cfe74b474bdfdf.tar.bz2
gentoo-635af6abf583f1e17860c0eb72cfe74b474bdfdf.zip
sys-libs/libomp: Disallow kernels with PDU scheduler
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
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libomp/libomp-4.0.1.ebuild13
-rw-r--r--sys-libs/libomp/libomp-5.0.0.ebuild13
-rw-r--r--sys-libs/libomp/libomp-5.0.1.ebuild13
-rw-r--r--sys-libs/libomp/libomp-9999.ebuild13
4 files changed, 40 insertions, 12 deletions
diff --git a/sys-libs/libomp/libomp-4.0.1.ebuild b/sys-libs/libomp/libomp-4.0.1.ebuild
index 2eed580030c3..299e49921e10 100644
--- a/sys-libs/libomp/libomp-4.0.1.ebuild
+++ b/sys-libs/libomp/libomp-4.0.1.ebuild
@@ -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
}
diff --git a/sys-libs/libomp/libomp-5.0.0.ebuild b/sys-libs/libomp/libomp-5.0.0.ebuild
index f90baa29e665..87c3bfe493f6 100644
--- a/sys-libs/libomp/libomp-5.0.0.ebuild
+++ b/sys-libs/libomp/libomp-5.0.0.ebuild
@@ -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
}
diff --git a/sys-libs/libomp/libomp-5.0.1.ebuild b/sys-libs/libomp/libomp-5.0.1.ebuild
index f90baa29e665..87c3bfe493f6 100644
--- a/sys-libs/libomp/libomp-5.0.1.ebuild
+++ b/sys-libs/libomp/libomp-5.0.1.ebuild
@@ -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
}
diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild
index 6b0c0b5b8014..4d5905215164 100644
--- a/sys-libs/libomp/libomp-9999.ebuild
+++ b/sys-libs/libomp/libomp-9999.ebuild
@@ -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
}