public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: dwmw2@infradead.org, linux-kernel@vger.kernel.org,
	iommu@lists.linux-foundation.org, mingo@redhat.com,
	airlied@linux.ie
Subject: Re: IOMMU and graphics cards
Date: Thu, 7 May 2009 14:00:08 +0200	[thread overview]
Message-ID: <20090507120007.GG4059@amd.com> (raw)
In-Reply-To: <20090507191724N.fujita.tomonori@lab.ntt.co.jp>

On Thu, May 07, 2009 at 07:23:33PM +0900, FUJITA Tomonori wrote:
> On Thu, 7 May 2009 12:01:14 +0200
> Joerg Roedel <joerg.roedel@amd.com> wrote:
> 
> > > Do you meant that AMD IOMMU code use the bitmap each device to manage
> > > address space so enlarging the DMA address space wastes memory?
> > 
> > Its not only the bitmap. There are also the page tables that would waste
> > memory if the aperture in the AMD IOMMU driver is enlarged to, say, 4GB.
> > Most devices don't need such a large amount of DMA address space. As I
> > found out VT-d does not have this problem because they implemented
> > another allocator which can cover all possible memory.
> > For the AMD IOMMU I currently implement a kind of a dynamically growing
> > bitmap allocator to fix this problem.
> 
> Yeah, I know the deference. Well, I like the AMD IOMMU driver's
> property that dma mapping doesn't fail in OOM but I understand why you
> want such daynamically growing.

Well, I will try to minimize the impact. Current plan is to preallocate
bitmap and page tables for 128MB of DMA address space. Everything beyond
that will be allocated on demand.

> > > >  But unless this problem isn't solved the
> > > > drivers won't be fixed, I guess.
> > > > I guess the DRM code in the kernel may have the same problem with IOMMU
> > > > enabled?
> > > 
> > > Looks like the DRM code uses the DMA API.
> > 
> > The proprietary drivers make problems so far. For the ATI one I am in
> > contact with the developers to try to fix it. But I can't do anything
> > about the other proprietary driver I am aware of :-(
> 
> I don't know anything about the graphic drivers but are there any
> other proprietary drivers except for ATI and AMD? Fixing only two
> drivers to make the majority happy?

At least Nvidia comes to my mind. Not sure about other graphic card
vendors...

Joerg

-- 
           | Advanced Micro Devices GmbH
 Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
 System    | 
 Research  | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
 Center    | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
           | Registergericht München, HRB Nr. 43632


  parent reply	other threads:[~2009-05-07 12:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28 15:05 IOMMU and graphics cards Joerg Roedel
2009-04-28 15:28 ` David Woodhouse
2009-04-28 16:04   ` Joerg Roedel
2009-05-07  7:47     ` FUJITA Tomonori
2009-05-07 10:01       ` Joerg Roedel
2009-05-07 10:22         ` David Woodhouse
2009-05-07 10:42           ` FUJITA Tomonori
2009-05-07 12:15           ` Joerg Roedel
2009-05-07 12:59             ` FUJITA Tomonori
2009-05-07 14:37               ` Joerg Roedel
2009-05-07 17:04             ` Christoph Hellwig
2009-05-07 18:36           ` David Miller
2009-05-08  9:35             ` Joerg Roedel
2009-07-06 12:26               ` David Woodhouse
2009-07-06 13:11                 ` Joerg Roedel
2009-07-06 14:18                   ` David Woodhouse
2009-07-06 21:35                     ` Dave Airlie
2009-07-06 22:00                       ` Dave Airlie
2009-07-07  8:54                         ` Joerg Roedel
2009-07-07 15:24                         ` Duran, Leo
2009-07-07 15:33                           ` Duran, Leo
2009-07-07 15:36                             ` David Woodhouse
2009-07-07  8:59                       ` Joerg Roedel
2009-07-07  9:16                         ` David Woodhouse
2009-07-07  9:05                       ` David Woodhouse
2009-05-07 10:23         ` FUJITA Tomonori
2009-05-07 11:01           ` Ingo Molnar
2009-05-07 11:14             ` FUJITA Tomonori
2009-05-07 11:26               ` Ingo Molnar
2009-05-07 12:00           ` Joerg Roedel [this message]
2009-05-07 10:55         ` Ingo Molnar

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=20090507120007.GG4059@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=airlied@linux.ie \
    --cc=dwmw2@infradead.org \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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