🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #240

Re: Performance of xchg reg,reg

#240
From: MitchAlsup
Date: Tue, 20 Oct 2026 16:45
41 lines
3022 bytes
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> posted:

> On 10/19/2026 4:17 PM, Joseph Seigh wrote:
> > On 10/19/26 5:08 PM, Chris M. Thomasson wrote:
> >> On 10/19/2026 6:38 AM, EricP wrote:
> >>> On 2026-Oct-18 15:27, Chris M. Thomasson wrote:
> >>>>
> >>>> Try a LOCK RMW on memory that straddles a L2 cache line. That should 
> >>>> trigger a full bus lock.
> >>>
> >>> FYI there is an article measuring the effects of cache line split locks
> >>>
> >>> Investigating Split Locks on x86-64
> >>> https://chipsandcheese.com/p/investigating-split-locks-on-x86
> >>>
> >>
> >> I see. Actually, a way to "abuse" it even further is to use a LOCK 
> >> RMW, say even LOCK XADD on something that straddles a cache line 
> >> issues a bus lock. So, I have seen some papers on abusing QPI to gain 
> >> a remote memory barrier or async sync for things like RCU. 
> >> FlushProcessWriteBuffers (windows way), I forgot the damn Linux thing. 
> >> I think it might be sys_membarrier...
> > 
> > 
> > You are thinking of IPI (inter processsor interrupt) maybe?  membarrier
> > changed to that apparently because the quiesce points used by the RCU
> > implementation of membarrier weren't frequent enough.
> 
> I remember reading a paper from somebody, was it Dice? Damn! Cannot 
> remember right now. That abused the QPI, I think the quick path 
> interconnect, to give them a "remote" membar to implement async algos. 
> Iirc they used misaligned LOCK RMW on something that straddled a l2 
> cache line to make the system assert a bus lock. I know I read the damn 
> paper but it was way back. Iiirc around 2006-2008 ish? I cannot remember.
> 
> The IPI uses things like FlushProcessWriteBuffers over on Windows, Linux 
> has one to.

In My 66000, an IPI is a write to MM I/O space and is sequentially
consistent, so all older writes leave the core prior to the MM I/O
leaving the core.
Technical Details
Message-ID: <1792514720-5857@newsgrouper.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
References: <2026Oct13.104347@mips.complang.tuwien.ac.at> <11atq3a$nqi$1@reader2.panix.com> <11au1vu$3ks5m$2@dont-email.me> <11aunpn$8c6$1@reader2.panix.com> <11b36i8$1e6f7$1@dont-email.me> <93pBS.146452$4b2.103340@fx47.iad> <11b60t8$2e75r$1@dont-email.me> <11b68dq$2govj$1@dont-email.me> <11b6uv5$2nn4o$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
From: MitchAlsup <user5857@newsgrouper.org.invalid>
Newsgroups: comp.arch
Subject: Re: Performance of xchg reg,reg
References: <2026Oct13.104347@mips.complang.tuwien.ac.at>
  <11atq3a$nqi$1@reader2.panix.com> <11au1vu$3ks5m$2@dont-email.me>
  <11aunpn$8c6$1@reader2.panix.com> <11b36i8$1e6f7$1@dont-email.me>
  <93pBS.146452$4b2.103340@fx47.iad> <11b60t8$2e75r$1@dont-email.me>
  <11b68dq$2govj$1@dont-email.me> <11b6uv5$2nn4o$1@dont-email.me>
Date: Tue, 20 Oct 2026 16:45:20 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <1792514720-5857@newsgrouper.org>
Injection-Info: newsgrouper.org; mail-complaints-to="newsgrouper@yahoo.com"; posting-account=user5857
Injection-Date: Tue, 20 Oct 2026 16:45:20 GMT
User-Agent: Newsgrouper/0.9.0