Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2007 19:55:45 -0800
From:      Xin LI <delphij@delphij.net>
To:        Jason Evans <jasone@FreeBSD.ORG>
Cc:        cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libc/stdlib malloc.c
Message-ID:  <474B9541.8040200@delphij.net>
In-Reply-To: <200711270317.lAR3HUAj078209@repoman.freebsd.org>
References:  <200711270317.lAR3HUAj078209@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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@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-----



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