From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Fri, 30 Oct 2009 10:11:45 -0400 To: 9fans@9fans.net Message-ID: <7e75491a3122899dcc98ee196f3d9492@brasstown.quanstro.net> In-Reply-To: <> References: <> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] double wakeup disallowed Topicbox-Message-UUID: 94582178-ead5-11e9-9d60-3106f5b1d025 On Fri Oct 30 01:47:06 EDT 2009, rsc@swtch.com wrote: > > btw, isn't the lockstats.locks++ in taslock:/^lock > > broken since >1 loads can happen simultaneously > > leading to undercounting? > > sure but does it need to be 100% accurate? probablly not. but it will be most inaccurate and cause the most performance impact when there's a lot of locking going on. i would think that's exactly when it would be most interesting. adding cores will make this worse, as does the false sharing of the lockstats. (i've seen some really wild results in my aoe testing.) so wouldn't xinc provide more consistent performance? there would be at most 1 wait for the lockstats cacheline per stat updated instead of 2. - erik