Date: Fri, 14 Apr 2006 19:17:59 -0400 From: Kris Kennaway <kris@obsecurity.org> To: Kris Kennaway <kris@obsecurity.org> Cc: current@FreeBSD.org, jhb@FreeBSD.org, davidxu@FreeBSD.org Subject: Re: Spinlock thrashing with libthr Message-ID: <20060414231759.GA9342@xor.obsecurity.org> In-Reply-To: <20060414224318.GA8716@xor.obsecurity.org> References: <20060414224318.GA8716@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Apr 14, 2006 at 06:43:18PM -0400, Kris Kennaway wrote: > I ran a modified version of the thr1 stress test on a quad amd64, > which spawns 256 threads (using libthr), each of which loops doing > getpid() 10000 times. The system spends essentially 100% of the time > in the kernel. Profiling with hwpmc shows that the system is spending > about 60% time in _mtx_lock_spin(). Turns out this is because of contention for the PROC_LOCK, which means lots of processes sleeping. Using getuid() instead (which doesn't acquire locks) does not show contention. Thanks to rwatson for figuring it out. Kris --DocE+STaALJfprDB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFEQC2mWry0BWjoQKURAq8+AJ0XHb7RDvSoJVyINoQUoP4BXTvR6ACdGcUY Zw/TgTZjUNXbmJdYIQZAjA0= =oXy5 -----END PGP SIGNATURE----- --DocE+STaALJfprDB--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060414231759.GA9342>