mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 08:11:08 +00:00
Do not scale NPTL tests with available number of CPUs
On very large multi-processor systems, creating hundreds of threads runs into a test time out. The tests do not seem to benefit from massive over-scheduling.
This commit is contained in:
parent
8a0e619652
commit
9ce673b69e
@ -1,3 +1,9 @@
|
|||||||
|
2017-08-30 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
Do not scale NPTL tests with available number of CPUs.
|
||||||
|
* nptl/tst-cond16.c (count): Set to constant value of 8.
|
||||||
|
* nptl/tst-cond18.c (count): Likewise.
|
||||||
|
|
||||||
2017-08-29 Joseph Myers <joseph@codesourcery.com>
|
2017-08-29 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
[BZ #22035]
|
[BZ #22035]
|
||||||
|
@ -28,7 +28,7 @@ pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
|
|||||||
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
bool n, exiting;
|
bool n, exiting;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int count;
|
enum { count = 8 }; /* Number of worker threads. */
|
||||||
|
|
||||||
void *
|
void *
|
||||||
tf (void *dummy)
|
tf (void *dummy)
|
||||||
@ -71,11 +71,6 @@ do_test (void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
count = sysconf (_SC_NPROCESSORS_ONLN);
|
|
||||||
if (count <= 0)
|
|
||||||
count = 1;
|
|
||||||
count *= 4;
|
|
||||||
|
|
||||||
pthread_t th[count];
|
pthread_t th[count];
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
int i, ret, sz;
|
int i, ret, sz;
|
||||||
|
@ -28,7 +28,8 @@
|
|||||||
pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
|
||||||
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
bool exiting;
|
bool exiting;
|
||||||
int fd, count, spins, nn;
|
int fd, spins, nn;
|
||||||
|
enum { count = 8 }; /* Number of worker threads. */
|
||||||
|
|
||||||
void *
|
void *
|
||||||
tf (void *id)
|
tf (void *id)
|
||||||
@ -82,11 +83,6 @@ do_test (void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
count = sysconf (_SC_NPROCESSORS_ONLN);
|
|
||||||
if (count <= 0)
|
|
||||||
count = 1;
|
|
||||||
count *= 8;
|
|
||||||
|
|
||||||
pthread_t th[count + 1];
|
pthread_t th[count + 1];
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
int i, ret, sz;
|
int i, ret, sz;
|
||||||
|
Loading…
Reference in New Issue
Block a user