From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3680 invoked by alias); 30 Mar 2012 16:21:10 -0000 Received: (qmail 3664 invoked by uid 22791); 30 Mar 2012 16:21:06 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Mar 2012 16:20:54 +0000 From: "law at redhat dot com" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/11787] Program with large TLS segment fails aio_write Date: Fri, 30 Mar 2012 16:46: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: law at redhat dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: carlos_odonell at mentor dot com X-Bugzilla-Target-Milestone: 2.16 X-Bugzilla-Changed-Fields: CC 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/msg00415.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=11787 law at redhat dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at redhat dot com --- Comment #24 from law at redhat dot com 2012-03-30 16:19:32 UTC --- I think the real question here isn't the change in the size of the stack but the increase in the # of pages and potential wastage. If the TLS is small won't we end up burning an entire page for this small amount of data? For apps that use small stacks and lots of threads, that extra page could turn out to be significant. I'm not sure I really buy the argument that if a thread asks for 16k that they get exactly 16k usable. However, obviously, if the TLS is taking up a significant portion of the thread's requested stack, then something needs to be done. There's no perfect solution here. I wonder if we could come up with a good heuristic based on the relative sizes of the TLS and thread requested stack. If the TLS is sufficiently small relative to the size of the requested stack, then just fold the TLS into the requested stack like we've always done. Otherwise, add the size of the TLS to the size of the requested stack (rounding to a page of course). Harder to document and implement, but seems like it'd strike a better balance. I don't know where the cutoff should be, 1%, 10%, 50%? Some experimentation may guide us. -- 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.