Date: Sun, 05 Apr 2009 12:52:45 -0700 From: Marcel Moolenaar <xcllnt@mac.com> To: Rafal Jaworowski <raj@semihalf.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r190704 - head/sys/powerpc/aim Message-ID: <EAC54A75-BE3E-4321-B246-4F8DCE9C0C98@mac.com> In-Reply-To: <7F1FC303-3EFC-4182-9260-FE35C4BD9909@semihalf.com> References: <200904042223.n34MN3RG082677@svn.freebsd.org> <7F1FC303-3EFC-4182-9260-FE35C4BD9909@semihalf.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 5, 2009, at 2:03 AM, Rafal Jaworowski wrote: >> Log: >> Perform a dummy stwcx. when we switch contexts. The context >> being switched out may hold a reservation. The stwcx. will >> clear the reservation. This is architecturally recommended. >> >> The scenario this addresses is as follows: >> 1. Thread 1 performs a lwarx and as such holds a reservation. >> 2. Thread 1 gets switched out (before doing the matching >> stwcx.) and thread 2 is switched in. >> 3. Thread 2 performs a stwcx. to the same reservation granule. >> This will succeed because the processor has the reservation >> even though thread 2 didn't do the lwarx. >> >> Note that on some processors the address given the stwcx. is >> not checked. On these processors the mere condition of having >> a reservation would cause the stwcx. to succeed, irrespective >> of whether the addresses are the same. The dummy stwcx. is >> especially important for those processors. > > Have you seen this false stwcx. actually succeed in some real > scenarios on AIM? Were there any tangible [corruption?] effects > observed without this fix? I think so, but I may be mistaken easily. I've been running with this for a while on my SMP machine and it "felt" more stable. make release for example would always end with sh(1) dumping core. I don't see that anymore. > We're seeing some hang with the dual E500 under very heavy loads, > but only with ULE (or we could only correlate this with ULE so far), > but didn't get to really close investigation of this issue yet. I'm > wondering if it's something of this sort too. It's not impossible. I can only say: try it :-) -- Marcel Moolenaar xcllnt@mac.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EAC54A75-BE3E-4321-B246-4F8DCE9C0C98>