Hi Petr, > >Hmm, increasing ulimit -v also did the trick (the test scripts had set the > >limit > >to 512000, changing that to 600000 fixed it). It just seemed to require > >slightly > >more memory on kfreebsd-amd64. I wouldn't see that your glibc patch affects > >memory usage, or have I overlooked something? > > It reduces stack allocated for each thread in pthread_create(). > The default max stack is 512MB, while the ARCH_STACK_MAX_SIZE is 32MB. > > When the getlimit() returned RLIM_INFINITY, > the used stack for each thread is 32 MB, > but when it returned any real number, the real number have been used. > The patch adds upper bound (128MB) of pthread stack size. > > During pthread_create() is the stack (pre-)allocated via mmap(), > i.e. 524288 have been even larger than 512000. > > On kfreebsd-i386, the default max stack is 64MB, while the > ARCH_STACK_MAX_SIZE is 8MB, the memory limit > 512000 have been therefore sufficient. >
Thanks for the explanation. Is it that patch that is included in version 2.10.2-7 of eglibc? We could decide to add a versioned depends for kfreebsd-amd64 only and revert our workaround, but then again dependencies like this just for the sake of a test suite don't seem to warranted. Best, Michael
pgpgjtbn5ijWW.pgp
Description: PGP signature