From: Jason Gunthorpe <jgg@ziepe.ca>
To: Gal Pressman <galpress@amazon.com>, Christoph Hellwig <hch@lst.de>
Cc: RDMA mailing list <linux-rdma@vger.kernel.org>
Subject: Re: ib_umem_get and DMA_API_DEBUG question
Date: Mon, 26 Aug 2019 11:39:36 -0300 [thread overview]
Message-ID: <20190826143936.GC27349@ziepe.ca> (raw)
In-Reply-To: <526c5b18-5853-c8dc-e112-31287a46e707@amazon.com>
On Mon, Aug 26, 2019 at 05:05:12PM +0300, Gal Pressman wrote:
> Hi all,
>
> Lately I've been seeing DMA-API call traces on our automated testing runs which
> complain about overlapping mappings of the same cacheline [1].
> The problem is (most likely) caused due to multiple calls to ibv_reg_mr with the
> same address, which as a result DMA maps the same physical addresses more than 7
> (ACTIVE_CACHELINE_MAX_OVERLAP) times.
>
> Is this considered a bad behavior by the test? Should this be caught by
> ib_core/driver somehow?
>
> Thanks,
> Gal
>
> [1]
> DMA-API: exceeded 7 overlapping mappings of cacheline 0x000000004a0ad6c0
> WARNING: CPU: 56 PID: 63572 at kernel/dma/debug.c:501 add_dma_entry+0x1fd/0x230
I understand it is technically a violation of the DMA Mapping API to
do this, as it can create incoherence in the CPU cache if there are
multiple entities claiming responsibility to flush it around DMA.
So if you see this from a kernel ULP it is probably a bug.
From the userspace flow.. We only support DMA cache coherent archs in
userspace, and there is no way to prevent userspace from registering
the same page multiple times (in fact there are good reasons to do
this), so it is a false message. Would be nice to be able to suppress
it from this path.
Jason
next prev parent reply other threads:[~2019-08-26 14:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 14:05 ib_umem_get and DMA_API_DEBUG question Gal Pressman
2019-08-26 14:23 ` Leon Romanovsky
2019-08-26 14:39 ` Gal Pressman
2019-08-26 14:39 ` Jason Gunthorpe [this message]
2019-08-27 8:28 ` Gal Pressman
2019-08-27 12:00 ` Jason Gunthorpe
2019-08-27 12:53 ` Gal Pressman
2019-08-27 13:17 ` Jason Gunthorpe
2019-08-27 13:22 ` Gal Pressman
2019-08-27 13:37 ` Jason Gunthorpe
2019-08-27 13:53 ` Gal Pressman
2019-08-28 14:15 ` Jason Gunthorpe
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=20190826143936.GC27349@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=galpress@amazon.com \
--cc=hch@lst.de \
--cc=linux-rdma@vger.kernel.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.