Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Feb 2005 23:30:21 -0500
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        Maxime Henrion <mux@freebsd.org>
Cc:        cvs-all@freebsd.org
Subject:   Re: cvs commit: src/lib/libpthread/thread thr_attr_init.c thr_init.c thr_private.h thr_stack.c
Message-ID:  <1108355421.93267.23.camel@shumai.marcuscom.com>
In-Reply-To: <20050214040349.GA61763@elvis.mu.org>
References:  <200502131838.j1DIc6tZ020690@repoman.freebsd.org> <1108337583.93267.1.camel@shumai.marcuscom.com> <20050214020531.GD40468@funkthat.com> <1108352249.93267.20.camel@shumai.marcuscom.com> <20050214040349.GA61763@elvis.mu.org>

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

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

On Mon, 2005-02-14 at 05:03 +0100, Maxime Henrion wrote:
> Joe Marcus Clarke wrote:
> > On Sun, 2005-02-13 at 18:05 -0800, John-Mark Gurney wrote:
> > > Joe Marcus Clarke wrote this message on Sun, Feb 13, 2005 at 18:33 -0=
500:
> > > > And there was much rejoicing!  I would like to reiterate mezz's req=
uest
> > > > for a __FreeBSD_version bump once all the thread libraries are upda=
ted.
> > > > It would also be good to get this MFC'd before 5.4.  Thanks again.
> > >=20
> > > If any application that cares/requires changes from the default, eith=
er
> > > due to large number of threads (requiring small stack size), or large
> > > stacks, should already be patched with their new defaults...  So
> > > requiring a modification based upon version before/after this change
> > > should be unnecessary...
> >=20
> > But knowing when this patch is implemented means we can _not_ patch
> > certain applications.  The best example of this is gstreamer.  Gstreame=
r
> > is patched to lower its initial thread stack usage to 1 MB since that
> > was the previous limit.  This severely limits gstreamer.  With the
> > larger initial thread stack size (something that is not changeable by
> > individual applications), we no longer need to cripple gstreamer on
> > -CURRENT.  Therefore, I ask __FreeBSD_version to be bumped so I know
> > when it's safe to let gstreamer take a full 2 MB of stack on the initia=
l
> > thread.
>=20
> Is there anything wrong with pthread_attr_setstacksize()?  Using this to
> patch the said applications would allow them to get an acceptably sized
> stack whether the host is running an old or a recent version of
> libpthread.  It would also make sense to then submit the patches to the
> vendor so that it's not too much a burden to maintain.

This works for all threads but the initial thread.  Gstreamer uses this
thread for most of its operations.  That stack size was set to be 1 MB
when gstreamer really wanted 2.  For all other thread problems, yes, I
used pthread_attr_setstacksize() as the solution.

Joe

>=20
> Cheers,
> Maxime
>=20
--=20
PGP Key : http://www.marcuscom.com/pgp.asc

--=-bOiNnBI9rv2NeY5sjdsl
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)

iD8DBQBCEClcb2iPiv4Uz4cRArH5AKCPWqJRNifFa8g9RsdCqJBCnfN99gCghyHD
0oO5PjXe2Fs8xyscMyfiTNs=
=2Hh3
-----END PGP SIGNATURE-----

--=-bOiNnBI9rv2NeY5sjdsl--



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