Linux DMA Mapping Updates Help Recover Losses Caused By Spectre V2 Retpolines
Yet another pull request sent in early ahead of the holidays for the Linux 4.21 kernel merge window are the DMA-Mapping updates managed by Christoph Hellwig. Normally the DMA-Mapping changes aren't really worth noting on Phoronix, but this time around it brings some improvements to help offset the overhead incurred by Retpolines for Spectre V2 mitigation.
While the year started looking rather brutal for Linux performance due to the costs associated with Spectre and Meltdown mitigations, fortunately, as we end 2018 there has been a lot of that overhead reduced and other ongoing optimizations. The latest example of this is with the DMA-Mapping changes to help recover much of the impact Retpolines had on the DMA code.
The patch series worth mentioning from this pull request is for avoiding indirect calls for DMA direct mappings. This patch series is able to recover much of the Retpoline overhead by consolidating a lot of the DMA mapping code into a single code path and from there using direct calls as much as possible in "avoiding huge retpoline overhead for high performance workloads." Tests were done against an XDP forwarding workload and it was found this patch series recovers a "large part" of that Retpoline induced slowdown. Red Hat kernel engineer Jesper Brouer confirmed the successes of this patch series.
That work and more is included as part of this pull request.
It's great to see the continued work on offsetting the overhead caused by Spectre/Meltdown while in 2019 we will see processors with more hardware-based mitigations.
While the year started looking rather brutal for Linux performance due to the costs associated with Spectre and Meltdown mitigations, fortunately, as we end 2018 there has been a lot of that overhead reduced and other ongoing optimizations. The latest example of this is with the DMA-Mapping changes to help recover much of the impact Retpolines had on the DMA code.
The patch series worth mentioning from this pull request is for avoiding indirect calls for DMA direct mappings. This patch series is able to recover much of the Retpoline overhead by consolidating a lot of the DMA mapping code into a single code path and from there using direct calls as much as possible in "avoiding huge retpoline overhead for high performance workloads." Tests were done against an XDP forwarding workload and it was found this patch series recovers a "large part" of that Retpoline induced slowdown. Red Hat kernel engineer Jesper Brouer confirmed the successes of this patch series.
That work and more is included as part of this pull request.
It's great to see the continued work on offsetting the overhead caused by Spectre/Meltdown while in 2019 we will see processors with more hardware-based mitigations.
1 Comment