All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Keith Packard <keithp@keithp.com>
Cc: Yang Bai <hamo.by@gmail.com>,
	Fengguang Wu <fengguang.wu@intel.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Fedora Kernel Team <kernel-team@fedoraproject.org>,
	kernel@tesarici.cz
Subject: Re: inode->i_wb_list corruption.
Date: Mon, 12 Mar 2012 19:26:30 -0400	[thread overview]
Message-ID: <20120312232630.GA20287@redhat.com> (raw)
In-Reply-To: <868vj97d20.fsf@sumi.keithp.com>

On Fri, Mar 09, 2012 at 12:08:07PM -0800, Keith Packard wrote:
 > <#part sign=pgpmime>
 > On Fri, 9 Mar 2012 13:00:15 -0500, Dave Jones <davej@redhat.com> wrote:
 > 
 > > i915_drm_thaw is a deep nest of functions though, so this is going to be
 > > hard to track down where that write is coming from. Because the corruption
 > > seems to happen to pages that are already allocated, we probably can't
 > > even rely on DEBUG_PAGEALLOC, though it might be worth trying.
 > 
 > I'm worried that the write is coming through the GTT, which would make
 > sense as these look like pixel values. If this is on Ironlake (core
 > I3-I7 first gen), we know there are issues when VT-d is enabled, and
 > the work-around for that doesn't appear to be in place for the hibernate
 > resume case.

Thinking about how the GTT could contain stale pointers, I came up with this scenario:

Before we begin the thaw, the initramfs sets up a framebuffer.
This causes the GTT to be setup.

- Thaw begins, hardware state still points to the GTT setup by the modesetting code.
  At this point, any graphics operations are going to cause writes through
  those translations. Bad news if we just wrote a bunch of thawed data there.

  or..

- Thaw begins, and data is written over the GTT setup by the initramfs, but 
  the hardware registers still points at it, until thaw is complete, when we
  reprogram the GTT registers to their pre-hibernate values.

If we could somehow set modeset=0 automatically if we detect a hibernate
partition it would probably 'solve' it, but I suspect the real answer
would be to do GTT teardown before we do a thaw.

	Dave


  parent reply	other threads:[~2012-03-12 23:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 18:51 inode->i_wb_list corruption Dave Jones
2012-03-06 21:03 ` Jan Kara
2012-03-07  7:26   ` Fengguang Wu
2012-03-07 10:42     ` Jan Kara
2012-03-09  8:34       ` Yang Bai
2012-03-09 14:57         ` Dave Jones
2012-03-09 15:19           ` Dave Jones
2012-03-09 16:14             ` Yang Bai
2012-03-09 18:00               ` Dave Jones
2012-03-09 20:08                 ` Keith Packard
2012-03-09 20:19                   ` Josh Boyer
2012-03-09 22:44                     ` Keith Packard
2012-03-12 21:13                       ` Josh Boyer
2012-03-12 21:27                         ` David Woodhouse
2012-03-12 23:26                   ` Dave Jones [this message]
2012-03-13  0:06                     ` Keith Packard
  -- strict thread matches above, loose matches on Subject: below --
2012-03-15 14:08 Petr Tesařík
2012-03-15 14:22 ` Dave Airlie
2012-03-15 14:49 ` Dave Jones

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=20120312232630.GA20287@redhat.com \
    --to=davej@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=hamo.by@gmail.com \
    --cc=keithp@keithp.com \
    --cc=kernel-team@fedoraproject.org \
    --cc=kernel@tesarici.cz \
    --cc=linux-kernel@vger.kernel.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 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.