|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XENVBD PATCH 3/3] ring: Weaken and delete unnecessary barriers
On 20/05/2026 10:35, Owen Smith wrote: > While there is potentially a difference between xen_rmb() and xen_wmb() in > Linux, both > are defined as KeMemoryBarrierWithoutFence() in the Windows drivers. > Is it necessary to have both entries here? > I take it that using xen_mb() (i.e. KeMemoryBarrier()) is not required, and a > single > KeMemoryBarrierWithoutFence() should be sufficient > > Owen > > @@ -1260,7 +1260,8 @@ BlkifRingPoll( > Retry = TRUE; > } > > - KeMemoryBarrier(); > + xen_rmb(); > + xen_wmb(); > > BlkifRing->Front.rsp_cons = rsp_cons; > BlkifRing->Shared->rsp_event = rsp_cons + 1; I think the main difference would be in architectures with a weak memory model (ARM64) if we ever decide to port the Windows PV drivers there. At the same time, WDK doesn't seem to provide an equivalent barrier (we'd have to resort to C11 barriers perhaps?) So I decided to keep both for correctness with the release semantics that I was looking for. Should we make our own acquire/release barrier macros for this purpose? -- Ngoc Tu Dinh | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |