Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2005 13:49:08 -0500
From:      Joe Marcus Clarke <marcus@FreeBSD.org>
To:        Daniel Eischen <deischen@FreeBSD.org>
Cc:        threads@FreeBSD.org
Subject:   Re: [PATCH] Dynamic thread stack size
Message-ID:  <1106592548.28710.7.camel@shumai.marcuscom.com>
In-Reply-To: <Pine.GSO.4.43.0501221255250.7191-100000@sea.ntplx.net>
References:  <Pine.GSO.4.43.0501221255250.7191-100000@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-C2j5odxSikAZQJOPtbrW
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Sat, 2005-01-22 at 13:03 -0500, Daniel Eischen wrote:
> On Fri, 21 Jan 2005, Joe Marcus Clarke wrote:
>=20
> > In a follow-up to the previous discussion on increasing our default
> > thread stacksize, I thought I'd look at how some other BSD
> > implementations do it.  Mezz mentioned that he thought NetBSD had a 2 M=
B
> > default stacksize, so I took a look.
> >
> > What I found was that NetBSD doesn't have a static default stacksize.
> > Instead, they use the stacksize rlimit and a PTHREAD_STACKSIZE
> > environment variable to get both the initial stacksize as well as each
> > thread's default stacksize.  I thought this would be a really good way
> > of doing things, so I ported their work to FreeBSD.
>=20
> Please no.  I don't want to have to set any more environment
> variables or login defaults to get libpthread to work with
> certain ports.

No need.  The default stacksize rlimit is more than enough (64 MB) to
satisfy every one of the affected ports thus far.  The environment
variable just gives us more runtime freedom.

>   Even if it were added, you'd have to do it
> to all thread libraries in all branches in order for ports
> to remove stacksize related patches.

I have no problem porting this to each thread library in each branch.
Besides, you'd have to touch the same to increase the static thread
stacksizes.

>=20
> I thought I had increased default stack sizes, but I see that
> I haven't yet.

I think this method (the rlimit method) addresses one of your earlier
criticisms that a static stacksize would just have to be bumped again
and again.  With dynamic stacksizes, we don't have to worry about this
ever again.  Besides, any user that lowers their rlimit stacksize below
1 MB shouldn't be expected much to work anyway.

Joe

>=20
--=20
Joe Marcus Clarke
FreeBSD GNOME Team      ::      gnome@FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome

--=-C2j5odxSikAZQJOPtbrW
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQBB9UMkb2iPiv4Uz4cRApkZAJ9FQ8qq4nHklEf1Gf2rxmHr+y/iUgCfYur6
vXGXRj4POM93dFDZaN+tstA=
=J/+N
-----END PGP SIGNATURE-----

--=-C2j5odxSikAZQJOPtbrW--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1106592548.28710.7.camel>