Dsb(sy) carries a huge amount of overhead.. This seems like overkill for
coherent DMA. Replace it with dmb(oshld)/dmb(oshst)
This saves about 1.5% CPU on my tiny N1 setup serving 80Gb/s of Netflix traffic.
Note this depends on D60098 to apply.
Differential D60099
arm64: Use only required ordering for coherent dma Authored by gallatin on Mon, Sep 28, 5:48 PM. Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions Trying to determine what you mean here.. Are you saying do the dmb for everyone, return on a NULL map, and continue to do the dsb() for non-coherent / bouncy devices? Comment Actions You can replace the existing dsb calls in with the appropriate dmb from the map == NULL block. Comment Actions From what I've read, I'm not sure that dmb is enough for non-coherent devices. At least it seems risky. I'd strongly prefer not to do that, as I don't have a non-coherent device that I can test with. Comment Actions I talked with the Arm Linux IOMMU/DMA maintainer about this & we concluded replacing the dsb's with dmb's are correct. I have HW & a local patch that I can test next week. |