Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2007 03:17:30 +0000 (UTC)
From:      Jason Evans <jasone@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/lib/libc/stdlib malloc.c
Message-ID:  <200711270317.lAR3HUAj078209@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.)
  
  Revision  Changes    Path
  1.151     +297 -58   src/lib/libc/stdlib/malloc.c



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