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: "Adhemerval Zanella (Code Review)" X-Patchwork-Id: 1192846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-106874-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gnutoolchain-gerrit.osci.io Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="rnQpN0tX"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47BR1h1NHMz9sPj for ; Mon, 11 Nov 2019 20:49:59 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:message-id:subject:references :reply-to:mime-version:content-transfer-encoding:content-type; q=dns; s=default; b=wMAR98J1imVHWSg6xkX7XcHEpABZCiAeg6ix64cjWWj KlBRsCg9XptxSn/LYEe4586baRYb98AspYg9QA+TInIv8dOgqhl9Wav0droLMzRw www9h5OFdHzUyiVPMfis1vev/qJ1XQT1gr9CS7cOU6CS6qszKgEUh8IQRGRFYK2M = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:message-id:subject:references :reply-to:mime-version:content-transfer-encoding:content-type; s=default; bh=uI/cBIDVKgUJwQxqhQnu7Bnny/M=; b=rnQpN0tXxkfo6Lcav 4mUAw1p0nujuCzHYr8lv2Nls3qWh3Bed/emVikJ1tVRUOhQhwqKrzrDL+GMGi4Sg synDXoPu+7NsVvVWV8sW7IhD5D5Fcw5YIhG2xvSYdkJcDjqEK/7obPxJ642bJLii GKslSMLsY6+cKcClFzYymdHsww= 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) {