[PATCH] NVMe: Use CMB for the SQ if available
Jon Derrick
jonathan.derrick at intel.com
Sun Jun 21 17:12:04 PDT 2015
>
> I think a store fence is necessary between memcpy_toio() and the doorbell ring.
> This applies elsewhere in the patch as well.
>
> For example, we've seen rare cases where Haswells do not emit the whole SQE out
> of the write combine buffers before the doorbell write traverses PCIe. Other
> architectures may have a similar need.
>
>
I suspect you may be right. X86's memcpy_toio decays to a memcpy, but many other architectures decay to writeb/l loops, so those are probably safe. I imagine in the general case, that a write barrier before writing the doorbell is required.
More information about the Linux-nvme
mailing list