mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Pavel Machek <pavel@suse.cz>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: RFC [PATCH] x86/pci: reserve extra page to avoid error caused by P2P pref DMA reads
Date: Wed, 27 Aug 2008 09:37:52 +0200	[thread overview]
Message-ID: <20080827073752.GD12191@elte.hu> (raw)
In-Reply-To: <1219822159-17245-1-git-send-email-yhlu.kernel@gmail.com>


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> Diag guys, found one system when loading is high, will have gart wark 
> error. root cause is P2P bridge try to prefetch for several intel 
> e1000 under it. and that skb is near GART iommu area.
> 
> try to reserve page in the boundary at first. last page near TOM2, and 
> last page near MMIO also gart first and last page.
> 
> need one better way for all arch support PCI and memory with a lot of 
> holes etc.

>  void __init dma32_reserve_bootmem(void)
>  {
>  	unsigned long size, align;
> +
> +	/*
> +	 * try to reserve last page to workaround P2P bridge pref DMA reads
> +	 * normally don't need to reserve the page near mmio,
> +	 * because always has acpi etc sit there.
> +	 * but some system has that acpi in the middle of ram below 4g
> +	 * so just reserve it.
> +	 */

Nice! Could this be the root cause of those skb corruptions and e1000 
crashes you've been reporting? So the _usual_ setup accidentally 
protects us from these prefetch induced failures.

I think your patch is fine for the iommu bits, but the 
reserve_last_page() thing should be done in a cleaner way. Cannot we 
just reserve it all at the e820 stage, before passing that RAM to the 
bootmem allocator?

Also, what is the guarantee that 4K of a space is enough to stop all 
prefetching across that boundary?

	Ingo

  reply	other threads:[~2008-08-27  7:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27  7:29 Yinghai Lu
2008-08-27  7:37 ` Ingo Molnar [this message]
2008-08-27  7:40 ` Benjamin Herrenschmidt
2008-08-27  7:45   ` 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=20080827073752.GD12191@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=hpa@zytor.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=tglx@linutronix.de \
    --cc=yhlu.kernel@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

all inboxes | Powered by JetHome®