unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [review] linux: Reduce stack size for nptl/tst-thread-affinity-pthread
@ 2019-11-11  9:49 Florian Weimer (Code Review)
  2019-11-11 11:26 ` Christian Brauner (Code Review)
  2019-11-11 12:50 ` [pushed] " Sourceware to Gerrit sync (Code Review)
  0 siblings, 2 replies; 3+ messages in thread
From: Florian Weimer (Code Review) @ 2019-11-11  9:49 UTC (permalink / raw)
  To: libc-alpha; +Cc: Florian Weimer

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/609
......................................................................

linux: Reduce stack size for nptl/tst-thread-affinity-pthread

And related tests.  These tests create a thread for each core, so
they may fail due to address space limitations with the default
stack size.

Change-Id: Ieef44a7731f58d3b7d6638cce4ccd31126647551
---
M sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
1 file changed, 4 insertions(+), 1 deletion(-)



diff --git a/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c b/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
index 73f4582..2b4ca5e 100644
--- a/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
+++ b/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
@@ -24,6 +24,7 @@
 #include <pthread.h>
 #include <stdbool.h>
 #include <stdlib.h>
+#include <support/xthread.h>
 #include <sys/time.h>
 
 struct conf;
@@ -191,6 +192,7 @@
       printf ("error: pthread_attr_init failed: %s\n", strerror (ret));
       return false;
     }
+  support_set_small_thread_stack_size (&attr);
 
   /* Spawn a thread pinned to each available CPU.  */
   for (int cpu = 0; cpu <= conf->last_cpu; ++cpu)
@@ -228,7 +230,8 @@
     {
       if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), initial_set))
 	continue;
-      ret = pthread_create (&other_threads[cpu].self, NULL,
+      ret = pthread_create (&other_threads[cpu].self,
+			    support_small_stack_thread_attribute (),
 			    thread_burn_any_cpu, other_threads + cpu);
       if (ret != 0)
 	{

-- 
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ieef44a7731f58d3b7d6638cce4ccd31126647551
Gerrit-Change-Number: 609
Gerrit-PatchSet: 1
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-MessageType: newchange

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [review] linux: Reduce stack size for nptl/tst-thread-affinity-pthread
  2019-11-11  9:49 [review] linux: Reduce stack size for nptl/tst-thread-affinity-pthread Florian Weimer (Code Review)
@ 2019-11-11 11:26 ` Christian Brauner (Code Review)
  2019-11-11 12:50 ` [pushed] " Sourceware to Gerrit sync (Code Review)
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner (Code Review) @ 2019-11-11 11:26 UTC (permalink / raw)
  To: Florian Weimer, libc-alpha

Christian Brauner has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/609
......................................................................


Patch Set 1: Code-Review+2


-- 
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ieef44a7731f58d3b7d6638cce4ccd31126647551
Gerrit-Change-Number: 609
Gerrit-PatchSet: 1
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Christian Brauner <christian.brauner@ubuntu.com>
Gerrit-Comment-Date: Mon, 11 Nov 2019 11:26:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pushed] linux: Reduce stack size for nptl/tst-thread-affinity-pthread
  2019-11-11  9:49 [review] linux: Reduce stack size for nptl/tst-thread-affinity-pthread Florian Weimer (Code Review)
  2019-11-11 11:26 ` Christian Brauner (Code Review)
@ 2019-11-11 12:50 ` Sourceware to Gerrit sync (Code Review)
  1 sibling, 0 replies; 3+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2019-11-11 12:50 UTC (permalink / raw)
  To: Florian Weimer, libc-alpha; +Cc: Christian Brauner

Sourceware to Gerrit sync has submitted this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/609
......................................................................

linux: Reduce stack size for nptl/tst-thread-affinity-pthread

And related tests.  These tests create a thread for each core, so
they may fail due to address space limitations with the default
stack size.

Change-Id: Ieef44a7731f58d3b7d6638cce4ccd31126647551
---
M sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Christian Brauner: Looks good to me, approved


diff --git a/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c b/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
index 73f4582..2b4ca5e 100644
--- a/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
+++ b/sysdeps/unix/sysv/linux/tst-skeleton-thread-affinity.c
@@ -24,6 +24,7 @@
 #include <pthread.h>
 #include <stdbool.h>
 #include <stdlib.h>
+#include <support/xthread.h>
 #include <sys/time.h>
 
 struct conf;
@@ -191,6 +192,7 @@
       printf ("error: pthread_attr_init failed: %s\n", strerror (ret));
       return false;
     }
+  support_set_small_thread_stack_size (&attr);
 
   /* Spawn a thread pinned to each available CPU.  */
   for (int cpu = 0; cpu <= conf->last_cpu; ++cpu)
@@ -228,7 +230,8 @@
     {
       if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), initial_set))
 	continue;
-      ret = pthread_create (&other_threads[cpu].self, NULL,
+      ret = pthread_create (&other_threads[cpu].self,
+			    support_small_stack_thread_attribute (),
 			    thread_burn_any_cpu, other_threads + cpu);
       if (ret != 0)
 	{

-- 
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ieef44a7731f58d3b7d6638cce4ccd31126647551
Gerrit-Change-Number: 609
Gerrit-PatchSet: 2
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Christian Brauner <christian.brauner@ubuntu.com>
Gerrit-MessageType: merged

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-11 12:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11  9:49 [review] linux: Reduce stack size for nptl/tst-thread-affinity-pthread Florian Weimer (Code Review)
2019-11-11 11:26 ` Christian Brauner (Code Review)
2019-11-11 12:50 ` [pushed] " Sourceware to Gerrit sync (Code Review)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).