From: Shuah Khan <shuah.khan@hp.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: fujita.tomonori@lab.ntt.co.jp,
LKML <linux-kernel@vger.kernel.org>,
akpm@linux-foundation.org, paul.gortmaker@windriver.com,
bhelgaas@google.com, amwang@redhat.com, shuahkhan@gmail.com
Subject: Re: [PATCH RFC] swiotlb: Disable swiotlb overflow support when CONFIG_ISA is enabled
Date: Mon, 16 Jul 2012 10:47:21 -0600 [thread overview]
Message-ID: <1342457241.2949.19.camel@lorien2> (raw)
In-Reply-To: <20120716160119.GE13540@phenom.dumpdata.com>
On Mon, 2012-07-16 at 12:01 -0400, Konrad Rzeszutek Wilk wrote:
> On Mon, Jul 16, 2012 at 09:48:20AM -0600, Shuah Khan wrote:
> > On Mon, 2012-07-16 at 10:45 -0400, Konrad Rzeszutek Wilk wrote:
> > > On Thu, Jul 12, 2012 at 10:17:50AM -0600, Shuah Khan wrote:
> > > > Disable iotlb overflow support when CONFIG_ISA is enabled. This is the
> > > > first step towards removing overflow support, to be consistent with other
> > > > iommu implementations and return DMA_ERROR_CODE. This disabling step is
> > > > for finding drivers that don't call dma_mapping_error to check for errors
> > > > returned by the mapping interface. Once drivers are fixed overflow support
> > > > can be removed.
> > >
> > > I think I explained myself poorly. We don't want to break old drivers.
> > >
> > > If the old drivers expect this behavior (while they should be updated
> > > to check the DMA), we need to retain this behavior.
> > >
> > > So I think the patch should be done the other way:
> > >
> > > Disable IOTLB overflow when CONFIG_ISA is disabled.
> >
> > That makes lot of sense :) I will redo the patch. It might be good to a
> > tunable to control enable/disable behavior. Even though support for this
> > new tunable "swiotlb_overflow" projected to be short lived, it will be
> > lot less painful to disable/enable as needed. Thought and comments?
>
> Tunnable have a habit of becoming permanant and we really don't want that.
> The right solution is to drop the overflow - as you have rightly
> pointed out in the first patch. But the road is blocked by these old
> drivers that are making it hard.
>
> I would say if you really really want a patch in for 3.6 before the
> final mega-patch of drivers-that-suck-and-need-to-be-updated-here-is
> -the-big-patch-that-does-it, then just add a WARN mentioning your
> name and mine (and LKML) saying to report what you see. That way
> we can at least get feedback from the field.
>
> And for good measure include in the Documentation/*deprecate-schedule
> that the overflow functionality is going away when all the drivers that
> depend on it have been fixed up.
Will work on it and get the patch with deprecation schedule document out
soon.
>
> >
> > >
> > > But we also need to check whether there are other drivers
> > > that don't properly check the DMA address. And if so, add them
> > > to this list of must have enabled b/c you might be using this
> > > driver.
> >
> > Sound good. Again having a tunable would help in this case as well.
> > >
> > > The first goal is to figure out which of the drivers aren't doing this
> > > properly. This should be possible by just grepping for 'dma_map' and
> > > seeing which ones don't do the 'dma_check' right after.
> >
> > I started some research into this and will continue and provide an
> > update.
>
> Thank you! It is pretty griddy work so I really appreciate you taking
> the time to do this. If are at the LinuxCon this year the beers (or coffee
> if that is your preference) are on me for tackling on this cleanup.
Thanks. Unfortunately I won't be at this year's LinuxCon, maybe I get to
take you up on your offer of coffee at one of the future ones.
-- Shuah
next prev parent reply other threads:[~2012-07-16 16:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 23:06 [PATCH RFC] swiotlb: Remove SWIOTLB overflow buffer support Shuah Khan
2012-07-09 20:25 ` Konrad Rzeszutek Wilk
2012-07-10 16:33 ` FUJITA Tomonori
2012-07-10 16:55 ` Shuah Khan
2012-07-10 17:32 ` Konrad Rzeszutek Wilk
2012-07-10 23:06 ` Shuah Khan
2012-07-10 23:13 ` Shuah Khan
2012-07-12 16:17 ` [PATCH RFC] swiotlb: Disable swiotlb overflow support when CONFIG_ISA is enabled Shuah Khan
2012-07-16 14:45 ` Konrad Rzeszutek Wilk
2012-07-16 15:48 ` Shuah Khan
2012-07-16 16:01 ` Konrad Rzeszutek Wilk
2012-07-16 16:47 ` Shuah Khan [this message]
2012-07-17 18:27 ` Shuah Khan
2012-07-17 20:13 ` [PATCH] swiotlb: Disable swiotlb overflow support when CONFIG_ISA is disabled Shuah Khan
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=1342457241.2949.19.camel@lorien2 \
--to=shuah.khan@hp.com \
--cc=akpm@linux-foundation.org \
--cc=amwang@redhat.com \
--cc=bhelgaas@google.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=shuahkhan@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).