From: Ingo Molnar <mingo@elte.hu>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Linus Torvalds <torvalds@linux-foundation.org>,
lethal@linux-sh.org, just.for.lkml@googlemail.com,
hancockrwd@gmail.com, jens.axboe@oracle.com,
bharrosh@panasas.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] dma-debug: disable DMA_API_DEBUG for now
Date: Sun, 7 Jun 2009 10:13:05 +0200 [thread overview]
Message-ID: <20090607081305.GA12497@elte.hu> (raw)
In-Reply-To: <20090605104132.GE24836@amd.com>
* Joerg Roedel <joerg.roedel@amd.com> wrote:
>
> On Fri, Jun 05, 2009 at 05:33:14PM +0900, FUJITA Tomonori wrote:
> > dma-debugs wrongly assumes that no multiple DMA transfers are
> > performed against the same dma address on one device at the same
> > time. However it's true only with hardware IOMMUs. For example, an
> > application can easily send the same buffer twice with different
> > lengths to one device by using DIO and AIO. If these requests are not
> > unmapped in the same order in which they were mapped,
> > hash_bucket_find() finds a wrong entry and gives a false warning.
> >
> > We should fix this before 2.6.30 release. Seems that there is no
> > easy way to fix it. I think that it's better to just disable
> > dma-debug for now.
> >
> > Torsten Kaiser found this bug with the RAID1 configuration:
> >
> > http://marc.info/?t=124336541900008&r=1&w=2
> >
>
> Argh, I never thought that this can happen. But its not explicitly
> forbidden so we have to handle this situation. Thanks for tracking
> down the bug to this issue.
>
> However, I think there is a somehow simple fix for the issue.
> Patch is attached. Its the least intrusive way I can think of to
> fix this problem.
>
> But its up to Linus/Ingo to decide if it can be accepted at this
> very late point in the cycle. Since dma-debug is new with 2.6.30
> it will at least not introduce any regression. [...]
I think it's too late for v2.6.30 to do any of the changes - and the
DMA debug facility is off by default.
Also, i think such DMA patterns, while 'allowed' can be quite
dangerous as its such a rare usage combination really. AIO and DIO
are crazy to begin with, mixing AIO and DIO for the same buffer is
madness square two. (It can result in 3 agents for the same memory
address: CPU, dma1 and dma2. How many interesting chipset erratums
could there be related to such scenarios?)
But it is certainly not the task of a debug facility to restrict
existing user-visible ABIs, so fixing the false positive is correct.
So i've applied your fix to the iommu branch for v2.6.31 and marked
it for -stable backporting, that way 2.6.30.1 will be able to pick
the patch up (if it remains problem-free in testing).
Thanks,
Ingo
next prev parent reply other threads:[~2009-06-07 8:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 8:33 [PATCH] dma-debug: disable DMA_API_DEBUG for now FUJITA Tomonori
2009-06-05 10:41 ` Joerg Roedel
2009-06-05 11:38 ` FUJITA Tomonori
2009-06-05 12:44 ` Joerg Roedel
2009-06-05 14:57 ` Arnd Bergmann
2009-06-05 15:52 ` Torsten Kaiser
2009-06-05 18:20 ` Joerg Roedel
2009-06-05 20:25 ` Torsten Kaiser
2009-06-05 22:11 ` Torsten Kaiser
2009-06-07 8:13 ` Ingo Molnar [this message]
2009-06-07 8:22 ` Torsten Kaiser
2009-06-07 10:45 ` FUJITA Tomonori
2009-06-10 20:41 ` Torsten Kaiser
2009-06-11 8:10 ` Joerg Roedel
2009-06-11 17:38 ` Torsten Kaiser
2009-06-12 7:50 ` Joerg Roedel
2009-06-12 14:13 ` Joerg Roedel
2009-06-12 14:51 ` Torsten Kaiser
2009-06-13 11:10 ` Joerg Roedel
2009-06-13 14:26 ` Torsten Kaiser
2009-06-13 17:34 ` Joerg Roedel
2009-06-13 17:08 ` Torsten Kaiser
2009-06-15 7:46 ` Joerg Roedel
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=20090607081305.GA12497@elte.hu \
--to=mingo@elte.hu \
--cc=bharrosh@panasas.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hancockrwd@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=joerg.roedel@amd.com \
--cc=just.for.lkml@googlemail.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox