From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22929 invoked by alias); 24 Mar 2012 17:39:59 -0000 Received: (qmail 22811 invoked by uid 22791); 24 Mar 2012 17:39:57 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 24 Mar 2012 17:39:44 +0000 From: "ppluzhnikov at google dot com" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/11787] Program with large TLS segment fails aio_write Date: Sat, 24 Mar 2012 18:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ppluzhnikov at google dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00312.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=11787 --- Comment #15 from Paul Pluzhnikov 2012-03-24 17:39:41 UTC --- (In reply to comment #14) > the increased size should only matter if the new size pushes past a page > boundary right ? and even then, it'd only be 4KiB per thread ? We really have to be careful when talking about "size". The actual used memory (RSS) is unchanged, only the reserved size (VM) is changing. To re-state Carlos' example, consider a 32-bit application that creates 1000s of threads, and has large TLS (1000s of __thread variables). Each thread is created with 64K stack (just barely sufficient to accomodate all of TLS variables) and otherwise does not use much of stack (e.g. a non-recursive computation). This application works fine currently. Under proposed change, the actual stack usage (RSS) is unchanged, but the reserved (VM) stack size for each thread nearly doubles to 64K+__static_tls_size. So the application would only be able to create half as many threads as it used to. I assert that this is a contrived example, and has a trivial fix: reduce 64K to 4K (or whatever *actual* stack the threads use). But I will go ahead and contact distribution maintainers, as Carlos suggested in comment#10. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.