mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: daniel.blueman@gmail.com, torvalds@linux-foundation.org,
	linux-kernel@vger.kernel.org, jbeulich@novell.com,
	jens.axboe@oracle.com, tony.luck@intel.com,
	akpm@linux-foundation.org
Subject: Re: [2.6.27-rc6, patch] fix SWIOTLB oops...
Date: Sun, 14 Sep 2008 17:31:04 +0200	[thread overview]
Message-ID: <20080914153104.GI29290@elte.hu> (raw)
In-Reply-To: <20080914034719Y.fujita.tomonori@lab.ntt.co.jp>


* FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:

> On Sat, 13 Sep 2008 18:53:13 +0100
> "Daniel J Blueman" <daniel.blueman@gmail.com> wrote:
> 
> > >> Fix back-off path when memory allocation fails
> > >> Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
> > >>
> > >> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> > >> index 977edbd..8826fdf 100644
> > >> --- a/lib/swiotlb.c
> > >> +++ b/lib/swiotlb.c
> > >> @@ -491,7 +491,7 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
> > >>                * the lowest available address range.
> > >>                */
> > >>               dma_addr_t handle;
> > >> -             handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE);
> > >> +             handle = swiotlb_map_single(hwdev, NULL, size, DMA_FROM_DEVICE);
> > >
> > > I think that it's better to use map_single instead of
> > > swiotlb_map_single since we always need swiotlb memory here.
> > >
> > > http://www.uwsg.iu.edu/hypermail/linux/kernel/0809.1/0043.html
> > 
> > Thanks Fujita; this looks a better way of doing this. I've tested the
> > three patches you posted and they address the original issue I bumped
> > into, so seem an appropriate fix for -rc7. Not sure if preceding
> > comments need tweaking though.
> > 
> > Our work isn't done yet though, since we see unexpected page state [5]
> > on the release path. Calling the appropriate IOMMU/SWIOTLB release
> > function [6] corrects this. Verified on x86-64 Intel system with
> > SWIOTLB in use due to large memory; without this, processes end up
> > hosed, so I'd say it's -rc7 material.
> 
> Are you sure your patch doesn't break other x86 IOMMU implementations
> (note that this patch affects all the IOMMUs)?
> 
> x86 IOMMU coherent code has been broken for a long time. The coherent
> code was completely rewritten for 2.6.28 to fix all the issues.
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git
> 
> I think it's too late to try to fix v2.6.27.

definitely - but if there are minimal fixes possible for regressions, 
those are still fine.

	Ingo

      reply	other threads:[~2008-09-14 15:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10 20:07 Daniel J Blueman
2008-09-11 13:29 ` FUJITA Tomonori
2008-09-13 17:53   ` Daniel J Blueman
2008-09-13 18:47     ` FUJITA Tomonori
2008-09-14 15:31       ` Ingo Molnar [this message]

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=20080914153104.GI29290@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=daniel.blueman@gmail.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jbeulich@novell.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --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

all inboxes | Powered by JetHome®