<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mesi on Jasper</title><link>https://jasper-aa64.github.io/zh/tags/mesi/</link><description>Recent content in Mesi on Jasper</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Wed, 21 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://jasper-aa64.github.io/zh/tags/mesi/index.xml" rel="self" type="application/rss+xml"/><item><title>交易系统笔记 #16：自旋锁</title><link>https://jasper-aa64.github.io/zh/posts/spinlock-implementation/</link><pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate><guid>https://jasper-aa64.github.io/zh/posts/spinlock-implementation/</guid><description>自旋锁快不快，看等锁的核在干什么：每次都读改写，就把锁所在的行抢来抢去；先读后抢、循环里加 PAUSE、抢输了退一步，等的时候才几乎不打扰持锁的核。</description></item><item><title>低时延交易 —— 缓存案例：一次行情重算 64 个期权</title><link>https://jasper-aa64.github.io/zh/posts/low-latency-cache-case-study/</link><pubDate>Tue, 20 Oct 2026 00:00:00 +0000</pubDate><guid>https://jasper-aa64.github.io/zh/posts/low-latency-cache-case-study/</guid><description>一条行情要碰 140 条缓存行，时间大多花在等它们。四步改的都不是计算，是数据什么时候到、到哪一层、在谁手里：让缺失同时在路上，提前要下一批，交出读一次就没用的行，跨核交接时少读一次，把要给对面读的行先放进 L3。</description></item><item><title>低时延交易 —— MESI 缓存一致性</title><link>https://jasper-aa64.github.io/zh/posts/low-latency-mesi-cache-coherence/</link><pubDate>Sun, 04 Oct 2026 00:00:00 +0000</pubDate><guid>https://jasper-aa64.github.io/zh/posts/low-latency-mesi-cache-coherence/</guid><description>MESI 只执行一条规矩：一条缓存行，要么只有一个核能写，要么有任意多个核只能读，两者不会同时存在。四个状态就是两个问题的答案——别人有没有这一行？我改过没有？协议里的每一笔代价，不是在层与层之间搬数据，就是在等另一个核确认。伪共享、SPSC 队列的缓存游标、读者越多生产者越慢，都是同一台状态机。一致性仍然不保证多字读取不撕裂，也不管不同地址的写谁先谁后，那是内存屏障的事。</description></item><item><title>交易系统笔记 #2：内存序与缓存行</title><link>https://jasper-aa64.github.io/zh/posts/memory-ordering-false-sharing-dependency-chains/</link><pubDate>Tue, 15 Sep 2026 00:00:00 +0000</pubDate><guid>https://jasper-aa64.github.io/zh/posts/memory-ordering-false-sharing-dependency-chains/</guid><description>同一套缓存硬件带出两个不相干的问题。正确性：写先进 store buffer，别的核要过一段时间才看得见，靠 release/acquire 配对补上顺序。性能：就算每个值都读对了，两个核抢同一条缓存行（伪共享）照样慢，靠缓存行布局解决。</description></item></channel></rss>