From patchwork Mon Nov 11 09:49:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 35785 Received: (qmail 91158 invoked by alias); 11 Nov 2019 09:49:52 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 91137 invoked by uid 89); 11 Nov 2019 09:49:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.osci.io X-Gerrit-PatchSet: 1 Date: Mon, 11 Nov 2019 04:49:43 -0500 From: "Florian Weimer (Code Review)" To: libc-alpha@sourceware.org Cc: Florian Weimer Message-ID: Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange Subject: [review] linux: Reduce stack size for nptl/tst-thread-affinity-pthread X-Gerrit-Change-Id: Ieef44a7731f58d3b7d6638cce4ccd31126647551 X-Gerrit-Change-Number: 609 X-Gerrit-ChangeURL: X-Gerrit-Commit: 9d225795ca6b92b77d638f3b08b5c708387ebd34 References: Reply-To: fweimer@redhat.com, fweimer@redhat.com, libc-alpha@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-76-gf8b6da0ab5 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 #include #include +#include #include 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) {