All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com,
	tony.luck@intel.com, linux-ia64@vger.kernel.org,
	iommu@lists.linux-foundation.org
Subject: Re: [PATCH 0/5] fix exhaustion of ZONE_DMA with swiotlb (in x86 tree)
Date: Mon, 08 Sep 2008 12:00:17 +0000	[thread overview]
Message-ID: <20080908120017.GI3189@amd.com> (raw)
In-Reply-To: <1220865014-1169-1-git-send-email-fujita.tomonori@lab.ntt.co.jp>

On Mon, Sep 08, 2008 at 06:10:09PM +0900, FUJITA Tomonori wrote:
> This patchset (against tip/master) fixes the problem that swiotlb
> exhausts ZONE_DMA:
> 
> http://lkml.org/lkml/2008/8/31/16
> 
> The root problem is that swiotlb_alloc_coherent always use ZONE_DMA,
> which is fine for IA64 but not for x86_64.
> 
> This patchset makes the callers set up the gfp flags so that
> swiotlb_alloc_coherent can stop playing with the gfp flags.
> 
> I think that it would be better to remove the allocation code in
> swiotlb_alloc_coherent theoretically (what swiotlb should do is taking
> care of the swiotlb memory. And swiotlb_alloc_coherent is not useful
> since we use it only when we can't allocate memory reachable by the
> device or we are in out of memory). But that code works for both x86
> and IA64 so it's not so bad, I guess.
> 
> #1 is for IA64, #2-4 for x86, and #5 is for swiotlb.

Cool :-)

This is much better than our last two tries to solve this problem. Doing
no gfp handling at all in swiotlb_alloc_coherent is a nice and clean
solution.

Joerg

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joerg.roedel@amd.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com,
	tony.luck@intel.com, linux-ia64@vger.kernel.org,
	iommu@lists.linux-foundation.org
Subject: Re: [PATCH 0/5] fix exhaustion of ZONE_DMA with swiotlb (in x86 tree)
Date: Mon, 8 Sep 2008 14:00:17 +0200	[thread overview]
Message-ID: <20080908120017.GI3189@amd.com> (raw)
In-Reply-To: <1220865014-1169-1-git-send-email-fujita.tomonori@lab.ntt.co.jp>

On Mon, Sep 08, 2008 at 06:10:09PM +0900, FUJITA Tomonori wrote:
> This patchset (against tip/master) fixes the problem that swiotlb
> exhausts ZONE_DMA:
> 
> http://lkml.org/lkml/2008/8/31/16
> 
> The root problem is that swiotlb_alloc_coherent always use ZONE_DMA,
> which is fine for IA64 but not for x86_64.
> 
> This patchset makes the callers set up the gfp flags so that
> swiotlb_alloc_coherent can stop playing with the gfp flags.
> 
> I think that it would be better to remove the allocation code in
> swiotlb_alloc_coherent theoretically (what swiotlb should do is taking
> care of the swiotlb memory. And swiotlb_alloc_coherent is not useful
> since we use it only when we can't allocate memory reachable by the
> device or we are in out of memory). But that code works for both x86
> and IA64 so it's not so bad, I guess.
> 
> #1 is for IA64, #2-4 for x86, and #5 is for swiotlb.

Cool :-)

This is much better than our last two tries to solve this problem. Doing
no gfp handling at all in swiotlb_alloc_coherent is a nice and clean
solution.

Joerg

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


  parent reply	other threads:[~2008-09-08 12:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08  9:10 [PATCH 0/5] fix exhaustion of ZONE_DMA with swiotlb (in x86 tree) FUJITA Tomonori
2008-09-08  9:10 ` FUJITA Tomonori
2008-09-08  9:10 ` [PATCH 1/5] ia64: dma_alloc_coherent always use GFP_DMA FUJITA Tomonori
2008-09-08  9:10   ` FUJITA Tomonori
2008-09-08  9:10   ` [PATCH 2/5] x86: move pci-nommu's dma_mask check to common code FUJITA Tomonori
2008-09-08  9:10     ` FUJITA Tomonori
2008-09-08  9:10     ` [PATCH 3/5] x86: fix nommu_alloc_coherent allocation with NULL device argument FUJITA Tomonori
2008-09-08  9:10       ` FUJITA Tomonori
2008-09-08  9:10       ` [PATCH 4/5] x86: dma_alloc_coherent sets gfp flags properly FUJITA Tomonori
2008-09-08  9:10         ` FUJITA Tomonori
2008-09-08  9:10         ` [PATCH 5/5] swiotlb: remove GFP_DMA hack in swiotlb_alloc_coherent FUJITA Tomonori
2008-09-08  9:10           ` FUJITA Tomonori
2008-09-08 12:02           ` Joerg Roedel
2008-09-08 12:02             ` Joerg Roedel
2008-09-08 12:01         ` [PATCH 4/5] x86: dma_alloc_coherent sets gfp flags properly Joerg Roedel
2008-09-08 12:01           ` Joerg Roedel
2008-09-08 12:01       ` [PATCH 3/5] x86: fix nommu_alloc_coherent allocation with NULL device argument Joerg Roedel
2008-09-08 12:01         ` Joerg Roedel
2008-09-08 12:01     ` [PATCH 2/5] x86: move pci-nommu's dma_mask check to common code Joerg Roedel
2008-09-08 12:01       ` Joerg Roedel
2008-09-08 12:00 ` Joerg Roedel [this message]
2008-09-08 12:00   ` [PATCH 0/5] fix exhaustion of ZONE_DMA with swiotlb (in x86 tree) Joerg Roedel
2008-09-08 13:52   ` [PATCH 0/5] fix exhaustion of ZONE_DMA with swiotlb (in x86 Ingo Molnar
2008-09-08 13:52     ` [PATCH 0/5] fix exhaustion of ZONE_DMA with swiotlb (in x86 tree) Ingo Molnar
2008-09-09 10:41 ` [PATCH 0/5] fix exhaustion of ZONE_DMA with swiotlb (in x86 KAMEZAWA Hiroyuki
2008-09-09 10:41   ` [PATCH 0/5] fix exhaustion of ZONE_DMA with swiotlb (in x86 tree) KAMEZAWA Hiroyuki

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=20080908120017.GI3189@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tony.luck@intel.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 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.