Blame SOURCES/glibc-rh1526193.patch
|
|
c6d234 |
commit 9ce673b69e82578044958f66d93dcaddb23f6e95
|
|
|
c6d234 |
Author: Florian Weimer <fweimer@redhat.com>
|
|
|
c6d234 |
Date: Wed Aug 30 16:20:20 2017 +0200
|
|
|
c6d234 |
|
|
|
c6d234 |
Do not scale NPTL tests with available number of CPUs
|
|
|
c6d234 |
|
|
|
c6d234 |
On very large multi-processor systems, creating hundreds of threads
|
|
|
c6d234 |
runs into a test time out. The tests do not seem to benefit from
|
|
|
c6d234 |
massive over-scheduling.
|
|
|
c6d234 |
|
|
|
c6d234 |
Index: b/nptl/tst-cond16.c
|
|
|
c6d234 |
===================================================================
|
|
|
c6d234 |
--- a/nptl/tst-cond16.c
|
|
|
c6d234 |
+++ b/nptl/tst-cond16.c
|
|
|
c6d234 |
@@ -27,7 +27,7 @@ pthread_cond_t cv = PTHREAD_COND_INITIAL
|
|
|
c6d234 |
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
|
|
c6d234 |
bool n, exiting;
|
|
|
c6d234 |
FILE *f;
|
|
|
c6d234 |
-int count;
|
|
|
c6d234 |
+enum { count = 8 }; /* Number of worker threads. */
|
|
|
c6d234 |
|
|
|
c6d234 |
void *
|
|
|
c6d234 |
tf (void *dummy)
|
|
|
c6d234 |
@@ -70,11 +70,6 @@ do_test (void)
|
|
|
c6d234 |
return 1;
|
|
|
c6d234 |
}
|
|
|
c6d234 |
|
|
|
c6d234 |
- count = sysconf (_SC_NPROCESSORS_ONLN);
|
|
|
c6d234 |
- if (count <= 0)
|
|
|
c6d234 |
- count = 1;
|
|
|
c6d234 |
- count *= 4;
|
|
|
c6d234 |
-
|
|
|
c6d234 |
pthread_t th[count];
|
|
|
c6d234 |
pthread_attr_t attr;
|
|
|
c6d234 |
int i, ret, sz;
|
|
|
c6d234 |
Index: b/nptl/tst-cond18.c
|
|
|
c6d234 |
===================================================================
|
|
|
c6d234 |
--- a/nptl/tst-cond18.c
|
|
|
c6d234 |
+++ b/nptl/tst-cond18.c
|
|
|
c6d234 |
@@ -27,7 +27,8 @@
|
|
|
c6d234 |
pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
|
|
|
c6d234 |
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
|
|
c6d234 |
bool exiting;
|
|
|
c6d234 |
-int fd, count, spins, nn;
|
|
|
c6d234 |
+int fd, spins, nn;
|
|
|
c6d234 |
+enum { count = 8 }; /* Number of worker threads. */
|
|
|
c6d234 |
|
|
|
c6d234 |
void *
|
|
|
c6d234 |
tf (void *id)
|
|
|
c6d234 |
@@ -81,11 +82,6 @@ do_test (void)
|
|
|
c6d234 |
return 1;
|
|
|
c6d234 |
}
|
|
|
c6d234 |
|
|
|
c6d234 |
- count = sysconf (_SC_NPROCESSORS_ONLN);
|
|
|
c6d234 |
- if (count <= 0)
|
|
|
c6d234 |
- count = 1;
|
|
|
c6d234 |
- count *= 8;
|
|
|
c6d234 |
-
|
|
|
c6d234 |
pthread_t th[count + 1];
|
|
|
c6d234 |
pthread_attr_t attr;
|
|
|
c6d234 |
int i, ret, sz;
|