From: Dan Williams <[email protected]>
To: Ming Lei <[email protected]>, Robin Murphy <[email protected]>
Cc: Christoph Hellwig <[email protected]>, Hannes Reinecke <[email protected]>,
"Hamza Mahfooz" <[email protected]>,
Dan Williams <[email protected]>,
<[email protected]>, <[email protected]>,
<[email protected]>, <[email protected]>,
<[email protected]>
Subject: Re: [Report] annoyed dma debug warning "cacheline tracking EEXIST, overlapping mappings aren't supported"
Date: Mon, 14 Oct 2024 19:22:56 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <Zw3MZrK_l7DuFfFd@fedora>
Ming Lei wrote:
> On Mon, Oct 14, 2024 at 07:09:08PM +0100, Robin Murphy wrote:
> > On 14/10/2024 8:58 am, Ming Lei wrote:
> > > On Mon, Oct 14, 2024 at 09:41:51AM +0200, Christoph Hellwig wrote:
> > > > On Mon, Oct 14, 2024 at 09:23:14AM +0200, Hannes Reinecke wrote:
> > > > > > 3) some storage utilities
> > > > > > - dm thin provisioning utility of thin_check
> > > > > > - `dt`(https://github.com/RobinTMiller/dt)
> > > > > >
> > > > > > I looks like same user buffer is used in more than 1 dio.
> > > > > >
> > > > > > 4) some self cooked test code which does same thing with 1)
> > > > > >
> > > > > > In storage stack, the buffer provider is far away from the actual DMA
> > > > > > controller operating code, which doesn't have the knowledge if
> > > > > > DMA_ATTR_SKIP_CPU_SYNC should be set.
> > > > > >
> > > > > > And suggestions for avoiding this noise?
> > > > > >
> > > > > Can you check if this is the NULL page? Operations like 'discard' will
> > > > > create bios with several bvecs all pointing to the same NULL page.
> > > > > That would be the most obvious culprit.
> > > >
> > > > The only case I fully understand without looking into the details
> > > > is raid1, and that will obviously map the same data multiple times
> > >
> > > The other cases should be concurrent DIOs on same userspace buffer.
> >
> > active_cacheline_insert() does already bail out for DMA_TO_DEVICE, so it
> > returning -EEXIST to tickle the warning would seem to genuinely imply these
> > are DMA mappings requesting to *write* the same cacheline concurrently,
> > which is indeed broken in general.
>
> The two io_uring tests are READ, and the dm thin_check are READ too.
"READ from the device" == "WRITE to the page" (DMA_FROM_DEVICE).
> For the raid1 case, the warning is from raid1_sync_request() which may
> have both READ/WRITE IO.
I don't see an easy way out of this without instrumenting archs that
can not support overlapping mappings to opt-in to bounce buffering for
these cases.
Archs that can support this can skip the opt-in and quiet this test, but
some of the value is being able to catch boundary conditions on more
widely available systems.
next prev parent reply other threads:[~2024-10-15 2:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 1:27 [Report] annoyed dma debug warning "cacheline tracking EEXIST, overlapping mappings aren't supported" Ming Lei
2024-10-14 7:23 ` Hannes Reinecke
2024-10-14 7:41 ` Christoph Hellwig
2024-10-14 7:58 ` Ming Lei
2024-10-14 18:09 ` Robin Murphy
2024-10-15 1:59 ` Ming Lei
2024-10-15 2:22 ` Dan Williams [this message]
2024-10-15 4:54 ` Christoph Hellwig
2024-10-15 7:40 ` Ming Lei
2024-10-15 7:54 ` Christoph Hellwig
2024-10-15 2:31 ` Ming Lei
2024-10-14 15:17 ` Jens Axboe
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=670dd20098d9d_3f142943d@dwillia2-xfh.jf.intel.com.notmuch \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox