cvs commit: src/lib/libc/stdlib malloc.c

Xin LI delphij at delphij.net
Mon Nov 26 19:56:00 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jason Evans wrote:
> jasone      2007-11-27 03:17:30 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     lib/libc/stdlib      malloc.c 
>   Log:
>   Implement dynamic load balancing of thread-->arena mapping, based on lock
>   contention.  The intent is to dynamically adjust to load imbalances, which
>   can cause severe contention.
>   
>   Use pthread mutexes where possible instead of libc "spinlocks" (they aren't
>   actually spin locks).  Conceptually, this change is meant only to support
>   the dynamic load balancing code by enabling the use of spin locks, but it
>   has the added apparent benefit of substantially improving performance due to
>   reduced context switches when there is moderate arena lock contention.
>   
>   Proper tuning parameter configuration for this change is a finicky business,
>   and it is very much machine-dependent.  One seemingly promising solution
>   would be to run a tuning program during operating system installation that
>   computes appropriate settings for load balancing.  (The pthreads adaptive
>   spin locks should probably be similarly tuned.)

What about using rc.d script to export these environment variables?  It
is not a big deal to do so (and has 0 side impact to previous releases),
and works well for my experimental setup that was inspired by David Xu's
yieldloops changeset.

Cheers,
- --
Xin LI <delphij at delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHS5VAhcUczkLqiksRAtvxAKCDePHcIcCRBT7X2xIxnBkO6EK2+QCfSRku
762vB1RFY0JdH5k5kbcu3Jo=
=wB5F
-----END PGP SIGNATURE-----


More information about the cvs-src mailing list