From: Yinghai Lu <yinghai@kernel.org>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: rdreier@cisco.com, linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: bisected crash due to "x86: Move swiotlb initialization before dma32_free_bootmem"
Date: Tue, 15 Dec 2009 01:11:05 -0800 [thread overview]
Message-ID: <4B2752A9.10903@kernel.org> (raw)
In-Reply-To: <20091215175439V.fujita.tomonori@lab.ntt.co.jp>
FUJITA Tomonori wrote:
> On Mon, 14 Dec 2009 23:47:07 -0800
> Roland Dreier <rdreier@cisco.com> wrote:
>
>> I have a big box (64 threads, 256GB memory) that is crashing early in
>> boot as below. I bisected it down to f4780ca0 ("x86: Move swiotlb
>> initialization before dma32_free_bootmem"); reverting just this commit
>> from the latest git (3ea6b3d0 is what I tested) fixes things.
>
> Ah, really sorry about that.
>
>
>> I haven't tried to debug this yet, but I guess on such a huge box there
>> is not enough memory below 4GB for swiotlb if we don't free the
>
> Yeah, Yinghai also hit this (his box has more memory than yours).
>
>
>> stuff allocated earlier? I don't know why that would be, since the
>> bootmem is grabbing 512MB and I have pretty close to 4GB below 4GB.
>> Anyway, I'm going to go to bed soon, but if you need more information or
>> have anything you want me to try, I will do it tomorrow morning.
>
> http://www.kernel.org/pub/linux/kernel/people/tomo/misc/0001-x86-two-stage-swiotlb-initialization.patch
>
> It makes the swiotlb initialization into two stages. I don't like it
> much since I like to avoid complicating the initialization.
>
> dma32_reserve_bootmem() allocates 128MB for broken GART IOMMU but I
> think 64MB should be enough since broken GART IOMMU allocates
> 64MB. The following simple patch might work too because swiotlb uses
> 64MB.
>
> With coming huge memory boxes, we might need to work on ZONE_DMA32
> shortage issue anyway (sparse-vmemmap, anything else)?
maybe just revert f4780ca0... for now
actually dma32_free_bootmem will also make sure it will give some buffer to pci_swiotlb_init...
YH
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index fcc2f2b..afcc58b 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -120,14 +120,11 @@ static void __init dma32_free_bootmem(void)
void __init pci_iommu_alloc(void)
{
- int use_swiotlb;
-
- use_swiotlb = pci_swiotlb_init();
#ifdef CONFIG_X86_64
/* free the range so iommu could get some range less than 4G */
dma32_free_bootmem();
#endif
- if (use_swiotlb)
+ if (pci_swiotlb_init())
return;
gart_iommu_hole_init();
next prev parent reply other threads:[~2009-12-15 9:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 7:47 bisected crash due to "x86: Move swiotlb initialization before dma32_free_bootmem" Roland Dreier
2009-12-15 8:55 ` FUJITA Tomonori
2009-12-15 9:04 ` Yinghai Lu
2009-12-15 9:23 ` FUJITA Tomonori
2009-12-15 9:11 ` Yinghai Lu [this message]
2009-12-15 9:23 ` FUJITA Tomonori
2009-12-15 10:56 ` Ingo Molnar
2009-12-15 11:10 ` FUJITA Tomonori
2009-12-15 11:25 ` Yinghai Lu
2009-12-15 11:43 ` Ingo Molnar
2009-12-15 11:50 ` FUJITA Tomonori
2009-12-15 13:04 ` Yinghai Lu
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=4B2752A9.10903@kernel.org \
--to=yinghai@kernel.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rdreier@cisco.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