Re: libthr and main thread stack size

2014-09-23 Thread Konstantin Belousov
On Tue, Sep 23, 2014 at 02:02:01PM +0400, Sergey Kandaurov wrote: > > + env_bigstack = getenv("LIBPTHREAD_BIGSTACK_MAIN"); > > + env_splitstack = getenv("LIBPTHREAD_SPLITSTACK_MAIN"); > > + if (bigstack != NULL || env_splitstack == NULL) { > looks like a ty

Re: libthr and main thread stack size

2014-09-23 Thread Sergey Kandaurov
On 23 September 2014 13:24, Konstantin Belousov wrote: > In the patch, default behaviour is to provide RLIMIT_STACK sized stack > for the main thread. The knobs are there to restore the old AS layout > if my fears of the binary compatibility become real one day, and to > keep the interface compat

Re: libthr and main thread stack size

2014-09-23 Thread Konstantin Belousov
On Mon, Sep 22, 2014 at 09:19:30AM -0400, Daniel Eischen wrote: > On Sun, 21 Sep 2014, Julian Elischer wrote: > > > On 9/20/14, 3:27 AM, John Baldwin wrote: > >> On Tuesday, September 16, 2014 11:13:24 AM Konstantin Belousov wrote: > >>> On Mon, Sep 15, 2014 at 03:47:41PM -0600, Justin T. Gibbs wr

Re: libthr and main thread stack size

2014-09-22 Thread John Baldwin
On Sunday, September 21, 2014 09:36:25 PM Justin T. Gibbs wrote: > On Sep 20, 2014, at 11:06 AM, Konstantin Belousov wrote: > > On Fri, Sep 19, 2014 at 03:27:25PM -0400, John Baldwin wrote: > >> I suspect it was done out of reasons of being overly conservative in > >> interpreting RLIMIT_STACK. I

Re: libthr and main thread stack size

2014-09-22 Thread Daniel Eischen
On Sun, 21 Sep 2014, Julian Elischer wrote: On 9/20/14, 3:27 AM, John Baldwin wrote: On Tuesday, September 16, 2014 11:13:24 AM Konstantin Belousov wrote: On Mon, Sep 15, 2014 at 03:47:41PM -0600, Justin T. Gibbs wrote: On Aug 8, 2014, at 5:22 AM, Konstantin Belousov wrote: ? Below is the

Re: libthr and main thread stack size

2014-09-21 Thread Justin T. Gibbs
On Sep 20, 2014, at 11:06 AM, Konstantin Belousov wrote: > On Fri, Sep 19, 2014 at 03:27:25PM -0400, John Baldwin wrote: >> I suspect it was done out of reasons of being overly conservative in >> interpreting RLIMIT_STACK. I think it is quite surprising behavior >> though and would rather we make

Re: libthr and main thread stack size

2014-09-20 Thread Julian Elischer
On 9/20/14, 3:27 AM, John Baldwin wrote: On Tuesday, September 16, 2014 11:13:24 AM Konstantin Belousov wrote: On Mon, Sep 15, 2014 at 03:47:41PM -0600, Justin T. Gibbs wrote: On Aug 8, 2014, at 5:22 AM, Konstantin Belousov wrote: ? Below is the patch which adds environment variable LIBPTHR

Re: libthr and main thread stack size

2014-09-20 Thread Konstantin Belousov
On Fri, Sep 19, 2014 at 03:27:25PM -0400, John Baldwin wrote: > I suspect it was done out of reasons of being overly conservative in > interpreting RLIMIT_STACK. I think it is quite surprising behavior > though and would rather we make your option the default and implement > what the Open Group say

Re: libthr and main thread stack size

2014-09-19 Thread John Baldwin
On Tuesday, September 16, 2014 11:13:24 AM Konstantin Belousov wrote: > On Mon, Sep 15, 2014 at 03:47:41PM -0600, Justin T. Gibbs wrote: > > On Aug 8, 2014, at 5:22 AM, Konstantin Belousov > > wrote: > > > > ? > > > > > Below is the patch which adds environment variable > > > LIBPTHREAD_BIGSTACK

Re: libthr and main thread stack size

2014-09-16 Thread Konstantin Belousov
On Mon, Sep 15, 2014 at 03:47:41PM -0600, Justin T. Gibbs wrote: > On Aug 8, 2014, at 5:22 AM, Konstantin Belousov wrote: > > ? > > > Below is the patch which adds environment variable > > LIBPTHREAD_BIGSTACK_MAIN. Setting it to any value results in the > > main thread stack left as is, and othe

Re: libthr and main thread stack size

2014-09-15 Thread Justin T. Gibbs
On Aug 8, 2014, at 5:22 AM, Konstantin Belousov wrote: … > Below is the patch which adds environment variable LIBPTHREAD_BIGSTACK_MAIN. > Setting it to any value results in the main thread stack left as is, and > other threads allocate stack below the area of RLIMIT_STACK. Try it. > I do not wa

Re: libthr and main thread stack size

2014-08-14 Thread Ivan A. Kosarev
On 08/13/2014 01:40 AM, Dimitry Andric wrote: On 08 Aug 2014, at 13:22, Konstantin Belousov wrote: On Fri, Aug 08, 2014 at 12:32:56PM +0400, Ivan A. Kosarev wrote: On 08/08/2014 09:28 AM, Konstantin Belousov wrote: On Thu, Aug 07, 2014 at 04:18:12PM +0400, Ivan A. Kosarev wrote: Hello, Acco

Re: libthr and main thread stack size

2014-08-12 Thread Dimitry Andric
On 08 Aug 2014, at 13:22, Konstantin Belousov wrote: > On Fri, Aug 08, 2014 at 12:32:56PM +0400, Ivan A. Kosarev wrote: >> >> On 08/08/2014 09:28 AM, Konstantin Belousov wrote: >>> On Thu, Aug 07, 2014 at 04:18:12PM +0400, Ivan A. Kosarev wrote: Hello, According to libthr's thr_in

Re: libthr and main thread stack size

2014-08-08 Thread Konstantin Belousov
On Fri, Aug 08, 2014 at 12:32:56PM +0400, Ivan A. Kosarev wrote: > > On 08/08/2014 09:28 AM, Konstantin Belousov wrote: > > On Thu, Aug 07, 2014 at 04:18:12PM +0400, Ivan A. Kosarev wrote: > >> Hello, > >> > >> According to libthr's thr_init.c (the 9.2 version) init_main_thread() > >> allocates s.

Re: libthr and main thread stack size

2014-08-08 Thread Ivan A. Kosarev
On 08/08/2014 09:28 AM, Konstantin Belousov wrote: On Thu, Aug 07, 2014 at 04:18:12PM +0400, Ivan A. Kosarev wrote: Hello, According to libthr's thr_init.c (the 9.2 version) init_main_thread() allocates s.c. "red zone" below the main stack in order to protect other stacks. The size of the main

Re: libthr and main thread stack size

2014-08-07 Thread Konstantin Belousov
On Thu, Aug 07, 2014 at 04:18:12PM +0400, Ivan A. Kosarev wrote: > Hello, > > According to libthr's thr_init.c (the 9.2 version) init_main_thread() > allocates s.c. "red zone" below the main stack in order to protect other > stacks. The size of the main stack is determined by the > _thr_stack_i

libthr and main thread stack size

2014-08-07 Thread Ivan A. Kosarev
Hello, According to libthr's thr_init.c (the 9.2 version) init_main_thread() allocates s.c. "red zone" below the main stack in order to protect other stacks. The size of the main stack is determined by the _thr_stack_initial variable that is declared extern though it doesn't seem it can be ch