All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: iommu@lists.linux-foundation.org,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Tariq Toukan" <tariqt@mellanox.com>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Toke Høiland-Jørgensen" <toke@toke.dk>,
	"Robin Murphy" <robin.murphy@arm.com>,
	linux-kernel@vger.kernel.org, brouer@redhat.com
Subject: Re: [RFC] avoid indirect calls for DMA direct mappings
Date: Thu, 6 Dec 2018 18:43:51 +0100	[thread overview]
Message-ID: <20181206184351.4d9ece54@redhat.com> (raw)
In-Reply-To: <20181206153720.10702-1-hch@lst.de>

On Thu,  6 Dec 2018 07:37:19 -0800
Christoph Hellwig <hch@lst.de> wrote:

> 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.

Full test report avail here:
 https://github.com/xdp-project/xdp-project/blob/master/areas/dma/dma01_test_hellwig_direct_dma.org


> 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
> 



-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

  parent reply	other threads:[~2018-12-06 17:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06 15:37 [RFC] avoid indirect calls for DMA direct mappings Christoph Hellwig
2018-12-06 15:37 ` Christoph Hellwig
     [not found] ` <20181206153720.10702-1-hch-jcswGhMUV9g@public.gmane.org>
2018-12-06 15:37   ` [PATCH] dma-mapping: bypass indirect calls for dma-direct Christoph Hellwig
2018-12-06 15:37     ` Christoph Hellwig
2018-12-06 17:40     ` Jesper Dangaard Brouer
2018-12-06 18:35       ` Christoph Hellwig
2018-12-06 17:43 ` Jesper Dangaard Brouer [this message]
     [not found]   ` <20181206184351.4d9ece54-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-12-06 18:29     ` [RFC] avoid indirect calls for DMA direct mappings Nadav Amit
2018-12-06 18:29       ` Nadav Amit
     [not found]       ` <A9F9D621-445E-4F3C-95FE-3963A3DAEF98-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-12-06 18:45         ` Christoph Hellwig
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:43     ` Christoph Hellwig
     [not found]     ` <20181206184330.GB30039-jcswGhMUV9g@public.gmane.org>
2018-12-06 18:51       ` Linus Torvalds
2018-12-06 18:51         ` Linus Torvalds
2018-12-06 18:54       ` Robin Murphy
2018-12-06 18:54         ` Robin Murphy
2018-12-06 20:00         ` Christoph Hellwig
2018-12-06 20:00           ` Christoph Hellwig
     [not found]           ` <20181206200006.GA31548-jcswGhMUV9g@public.gmane.org>
2018-12-06 20:24             ` Robin Murphy
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 15:44                   ` Jesper Dangaard Brouer
2018-12-07 16:05                   ` Jesper Dangaard Brouer
2018-12-07 16:05                     ` Jesper Dangaard Brouer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181206184351.4d9ece54@redhat.com \
    --to=brouer@redhat.com \
    --cc=hch@lst.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=tariqt@mellanox.com \
    --cc=toke@toke.dk \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.