From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 21 Jun 2010 17:21:36 -0400 To: 9fans@9fans.net Message-ID: In-Reply-To: <20100621211101.0405C5B3E@mail.bitblocks.com> References: <20100621211101.0405C5B3E@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] interesting timing tests Topicbox-Message-UUID: 3622efce-ead6-11e9-9d60-3106f5b1d025 > > note the extreme system time on the 16 processor machine > > Could this be due to memory contention caused by spinlocks? > While locks are spinning they eat up memory bandwidth which > slows down everyone's memory accesses (including the one who > is trying to finish its work while holding the spinlock). > And the more processors contend, the worse it gets.... perhaps. > How well does plan9 lock() scale with the number of processor? i think the question is, are there any spin locks that can become unreasonablly contended as conf.nmach goes up. if so, i would think that rather than finding the optimal solution to pessimal use of spinlocks, we should look to optimize our use of spinlocks. the underlying assumption is that the contended case is rare. if this is not the case, then spin locks are not a good choice. - erik