Article View: comp.arch
Article #237Re: Performance of xchg reg,reg
From: Chris M. Thomasson
Date: Tue, 20 Oct 2026 05:41
Date: Tue, 20 Oct 2026 05:41
35 lines
3140 bytes
3140 bytes
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.
Technical Details
Message-ID:
<11b6uv5$2nn4o$1@dont-email.me>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!.POSTED!not-for-mailReferences:
<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>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!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> Newsgroups: comp.arch Subject: Re: Performance of xchg reg,reg Date: Mon, 19 Oct 2026 22:41:54 -0700 Organization: A noiseless patient Spider Lines: 35 Message-ID: <11b6uv5$2nn4o$1@dont-email.me> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 20 Oct 2026 05:41:58 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2874520"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19yx+2oryobtSNrf0Xp/4YIiix32uRaqSQ="; posting-host="ac8b421d91295724de1c891325ec3b23" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:1Jjy9uFe6lfpW9+q2m+LswaqrBU= sha256:Jc/Qrdh8Ff9D4KEeqz10bhTrbfJ1ERBdQv/xUZJqapU= sha1:5wGmpikA4wsxhHGJryNJVUQaVlY= sha256:W99rjR6SW7wL6d/v6A9N/HR12u92NXVbQ/qIuQuM2GU= Content-Language: en-US In-Reply-To: <11b68dq$2govj$1@dont-email.me>