linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] avoid indirect calls for DMA direct mappings
@ 2018-12-06 15:37 Christoph Hellwig
  2018-12-06 15:37 ` [PATCH] dma-mapping: bypass indirect calls for dma-direct Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Christoph Hellwig @ 2018-12-06 15:37 UTC (permalink / raw)
  To: iommu, Linus Torvalds, Jesper Dangaard Brouer
  Cc: Tariq Toukan, Ilias Apalodimas, Toke Høiland-Jørgensen,
	Robin Murphy, linux-kernel

Hi all,

a while ago Jesper reported major performance regressions due to the
spectre v2 mitigations in his XDP forwarding workloads.  A large part
of that is due to the DMA mapping API indirect calls.

It turns out that the most common implementation of the DMA API is the
direct mapping case, and now that we have merged almost all duplicate
implementations of that into a single generic one is easily feasily to
direct calls for this fast path.

This patch adds a check if we are using dma_direct_ops in each fast path
DMA operation, and just uses a direct call instead.  For the XDP workload
this increases the number of packets per second from 7,438,283 to
9,610,088, so it provides a very significant speedup.

Note that the patch depends on a lot of work either queued up in the
DMA mapping tree, or still out on the list from review, so to actually
try the patch you probably want this git tree:


    git://git.infradead.org/users/hch/misc.git dma-direct-calls

Gitweb:

    http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-direct-calls


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-12-07 16:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06 15:37 [RFC] avoid indirect calls for DMA direct mappings Christoph Hellwig
2018-12-06 15:37 ` [PATCH] dma-mapping: bypass indirect calls for dma-direct Christoph Hellwig
2018-12-06 17:40   ` Jesper Dangaard Brouer
2018-12-06 18:35     ` Christoph Hellwig
2018-12-06 17:43 ` [RFC] avoid indirect calls for DMA direct mappings Jesper Dangaard Brouer
2018-12-06 18:29   ` Nadav Amit
2018-12-06 18:45     ` Christoph Hellwig
2018-12-06 18:28 ` Linus Torvalds
2018-12-06 18:30   ` Linus Torvalds
2018-12-06 18:43   ` Christoph Hellwig
2018-12-06 18:51     ` Linus Torvalds
2018-12-06 18:54     ` Robin Murphy
2018-12-06 20:00       ` Christoph Hellwig
2018-12-06 20:24         ` Robin Murphy
2018-12-07  1:21           ` Christoph Hellwig
2018-12-07 15:44             ` Jesper Dangaard Brouer
2018-12-07 16:05               ` Jesper Dangaard Brouer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).