1 |
commit: 0d9c0f4a785d5021d3c01307388d0ecbf0f63cd4 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 30 19:29:00 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 30 19:31:21 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d9c0f4a |
7 |
|
8 |
sys-libs/libomp: Perform PDS checks only for relevant kernel versions |
9 |
|
10 |
Update the PDS check logic to apply only when running the Linux kernel, |
11 |
versions between 4.13 and 4.15. That covers the range of -pf kernels |
12 |
that have the broken PDS version, and I think we can reasonably assume |
13 |
users will not be updating the patch along with the kernel. |
14 |
|
15 |
Also, perform the check only once in pkg_pretend. There is really |
16 |
no point in repeating it as packages do not alter kernel configuration. |
17 |
|
18 |
Closes: https://bugs.gentoo.org/638410 |
19 |
|
20 |
sys-libs/libomp/libomp-4.0.1.ebuild | 24 +++++++++++++++--------- |
21 |
sys-libs/libomp/libomp-5.0.1.ebuild | 24 +++++++++++++++--------- |
22 |
sys-libs/libomp/libomp-6.0.9999.ebuild | 24 +++++++++++++++--------- |
23 |
sys-libs/libomp/libomp-9999.ebuild | 24 +++++++++++++++--------- |
24 |
4 files changed, 60 insertions(+), 36 deletions(-) |
25 |
|
26 |
diff --git a/sys-libs/libomp/libomp-4.0.1.ebuild b/sys-libs/libomp/libomp-4.0.1.ebuild |
27 |
index 9e63a216516..7b78f15ca8d 100644 |
28 |
--- a/sys-libs/libomp/libomp-4.0.1.ebuild |
29 |
+++ b/sys-libs/libomp/libomp-4.0.1.ebuild |
30 |
@@ -21,7 +21,7 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz" |
31 |
LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" |
32 |
SLOT="0" |
33 |
KEYWORDS="amd64 ~arm64 x86" |
34 |
-IUSE="hwloc ompt test" |
35 |
+IUSE="hwloc kernel_linux ompt test" |
36 |
RESTRICT="!test? ( test )" |
37 |
|
38 |
RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" |
39 |
@@ -42,22 +42,28 @@ S=${WORKDIR}/openmp-${PV/_/}.src |
40 |
# least intrusive of all |
41 |
CMAKE_BUILD_TYPE=RelWithDebInfo |
42 |
|
43 |
-CONFIG_CHECK="~!SCHED_PDS" |
44 |
-ERROR_SCHED_PDS="PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels |
45 |
->= 4.13-pf11 < 4.14-pf9) do not implement sched_yield() call which |
46 |
-may result in horrible performance problems with libomp. If you are using one |
47 |
-of the specified kernel versions, you may want to disable the PDS scheduler." |
48 |
- |
49 |
python_check_deps() { |
50 |
has_version "dev-python/lit[${PYTHON_USEDEP}]" |
51 |
} |
52 |
|
53 |
+kernel_pds_check() { |
54 |
+ if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then |
55 |
+ local CONFIG_CHECK="~!SCHED_PDS" |
56 |
+ local ERROR_SCHED_PDS="\ |
57 |
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 |
58 |
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible |
59 |
+performance problems with libomp. If you are using one of the specified |
60 |
+kernel versions, you may want to disable the PDS scheduler." |
61 |
+ |
62 |
+ check_extra_config |
63 |
+ fi |
64 |
+} |
65 |
+ |
66 |
pkg_pretend() { |
67 |
- linux-info_pkg_setup |
68 |
+ kernel_pds_check |
69 |
} |
70 |
|
71 |
pkg_setup() { |
72 |
- linux-info_pkg_setup |
73 |
use test && python-any-r1_pkg_setup |
74 |
} |
75 |
|
76 |
|
77 |
diff --git a/sys-libs/libomp/libomp-5.0.1.ebuild b/sys-libs/libomp/libomp-5.0.1.ebuild |
78 |
index c3c4114ff60..6c5b2b9c352 100644 |
79 |
--- a/sys-libs/libomp/libomp-5.0.1.ebuild |
80 |
+++ b/sys-libs/libomp/libomp-5.0.1.ebuild |
81 |
@@ -21,7 +21,7 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz" |
82 |
LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" |
83 |
SLOT="0" |
84 |
KEYWORDS="amd64 ~arm64 x86" |
85 |
-IUSE="hwloc ompt test" |
86 |
+IUSE="hwloc kernel_linux ompt test" |
87 |
RESTRICT="!test? ( test )" |
88 |
|
89 |
RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )" |
90 |
@@ -42,22 +42,28 @@ S=${WORKDIR}/openmp-${PV/_/}.src |
91 |
# least intrusive of all |
92 |
CMAKE_BUILD_TYPE=RelWithDebInfo |
93 |
|
94 |
-CONFIG_CHECK="~!SCHED_PDS" |
95 |
-ERROR_SCHED_PDS="PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels |
96 |
->= 4.13-pf11 < 4.14-pf9) do not implement sched_yield() call which |
97 |
-may result in horrible performance problems with libomp. If you are using one |
98 |
-of the specified kernel versions, you may want to disable the PDS scheduler." |
99 |
- |
100 |
python_check_deps() { |
101 |
has_version "dev-python/lit[${PYTHON_USEDEP}]" |
102 |
} |
103 |
|
104 |
+kernel_pds_check() { |
105 |
+ if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then |
106 |
+ local CONFIG_CHECK="~!SCHED_PDS" |
107 |
+ local ERROR_SCHED_PDS="\ |
108 |
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 |
109 |
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible |
110 |
+performance problems with libomp. If you are using one of the specified |
111 |
+kernel versions, you may want to disable the PDS scheduler." |
112 |
+ |
113 |
+ check_extra_config |
114 |
+ fi |
115 |
+} |
116 |
+ |
117 |
pkg_pretend() { |
118 |
- linux-info_pkg_setup |
119 |
+ kernel_pds_check |
120 |
} |
121 |
|
122 |
pkg_setup() { |
123 |
- linux-info_pkg_setup |
124 |
use test && python-any-r1_pkg_setup |
125 |
} |
126 |
|
127 |
|
128 |
diff --git a/sys-libs/libomp/libomp-6.0.9999.ebuild b/sys-libs/libomp/libomp-6.0.9999.ebuild |
129 |
index 30de17ed6c2..01d1bd791b8 100644 |
130 |
--- a/sys-libs/libomp/libomp-6.0.9999.ebuild |
131 |
+++ b/sys-libs/libomp/libomp-6.0.9999.ebuild |
132 |
@@ -24,7 +24,7 @@ EGIT_BRANCH="release_60" |
133 |
LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" |
134 |
SLOT="0" |
135 |
KEYWORDS="" |
136 |
-IUSE="cuda hwloc offload ompt test" |
137 |
+IUSE="cuda hwloc kernel_linux offload ompt test" |
138 |
# CUDA works only with the x86_64 ABI |
139 |
REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )" |
140 |
RESTRICT="!test? ( test )" |
141 |
@@ -51,22 +51,28 @@ DEPEND="${RDEPEND} |
142 |
# least intrusive of all |
143 |
CMAKE_BUILD_TYPE=RelWithDebInfo |
144 |
|
145 |
-CONFIG_CHECK="~!SCHED_PDS" |
146 |
-ERROR_SCHED_PDS="PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels |
147 |
->= 4.13-pf11 < 4.14-pf9) do not implement sched_yield() call which |
148 |
-may result in horrible performance problems with libomp. If you are using one |
149 |
-of the specified kernel versions, you may want to disable the PDS scheduler." |
150 |
- |
151 |
python_check_deps() { |
152 |
has_version "dev-python/lit[${PYTHON_USEDEP}]" |
153 |
} |
154 |
|
155 |
+kernel_pds_check() { |
156 |
+ if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then |
157 |
+ local CONFIG_CHECK="~!SCHED_PDS" |
158 |
+ local ERROR_SCHED_PDS="\ |
159 |
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 |
160 |
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible |
161 |
+performance problems with libomp. If you are using one of the specified |
162 |
+kernel versions, you may want to disable the PDS scheduler." |
163 |
+ |
164 |
+ check_extra_config |
165 |
+ fi |
166 |
+} |
167 |
+ |
168 |
pkg_pretend() { |
169 |
- linux-info_pkg_setup |
170 |
+ kernel_pds_check |
171 |
} |
172 |
|
173 |
pkg_setup() { |
174 |
- linux-info_pkg_setup |
175 |
use test && python-any-r1_pkg_setup |
176 |
} |
177 |
|
178 |
|
179 |
diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild |
180 |
index 08c180ec179..75dd8476fff 100644 |
181 |
--- a/sys-libs/libomp/libomp-9999.ebuild |
182 |
+++ b/sys-libs/libomp/libomp-9999.ebuild |
183 |
@@ -23,7 +23,7 @@ EGIT_REPO_URI="https://git.llvm.org/git/openmp.git |
184 |
LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant" |
185 |
SLOT="0" |
186 |
KEYWORDS="" |
187 |
-IUSE="cuda hwloc offload ompt test" |
188 |
+IUSE="cuda hwloc kernel_linux offload ompt test" |
189 |
# CUDA works only with the x86_64 ABI |
190 |
REQUIRED_USE="offload? ( cuda? ( abi_x86_64 ) )" |
191 |
RESTRICT="!test? ( test )" |
192 |
@@ -50,22 +50,28 @@ DEPEND="${RDEPEND} |
193 |
# least intrusive of all |
194 |
CMAKE_BUILD_TYPE=RelWithDebInfo |
195 |
|
196 |
-CONFIG_CHECK="~!SCHED_PDS" |
197 |
-ERROR_SCHED_PDS="PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels |
198 |
->= 4.13-pf11 < 4.14-pf9) do not implement sched_yield() call which |
199 |
-may result in horrible performance problems with libomp. If you are using one |
200 |
-of the specified kernel versions, you may want to disable the PDS scheduler." |
201 |
- |
202 |
python_check_deps() { |
203 |
has_version "dev-python/lit[${PYTHON_USEDEP}]" |
204 |
} |
205 |
|
206 |
+kernel_pds_check() { |
207 |
+ if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then |
208 |
+ local CONFIG_CHECK="~!SCHED_PDS" |
209 |
+ local ERROR_SCHED_PDS="\ |
210 |
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11 |
211 |
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible |
212 |
+performance problems with libomp. If you are using one of the specified |
213 |
+kernel versions, you may want to disable the PDS scheduler." |
214 |
+ |
215 |
+ check_extra_config |
216 |
+ fi |
217 |
+} |
218 |
+ |
219 |
pkg_pretend() { |
220 |
- linux-info_pkg_setup |
221 |
+ kernel_pds_check |
222 |
} |
223 |
|
224 |
pkg_setup() { |
225 |
- linux-info_pkg_setup |
226 |
use test && python-any-r1_pkg_setup |
227 |
} |