public inbox for kernel-testers@vger.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
To: Jesse Barnes <jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org>
Cc: reinette chatre
	<reinette.chatre-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Kernel Testers List
	<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>,
	"Ma, Ling" <ling.ma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r@public.gmane.org"
	<bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r@public.gmane.org>
Subject: Re: [Bug #13819] system freeze when switching to console
Date: Tue, 8 Sep 2009 12:26:45 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0909081219130.7458@localhost.localdomain> (raw)
In-Reply-To: <20090908112014.002a35af@jbarnes-g45>



On Tue, 8 Sep 2009, Jesse Barnes wrote:
> 
> Theoretically i915_gem_idle should prevent any user interrupts from
> coming in.

That is _entirely_ immaterial.

The thing is, interrupts can be shared. So it does not matter ONE WHIT 
that you are trying to idle the hardware - there may be _other_ hardware 
in the machine that is not idle, and that raises the same shared 
interrupt. End result: the irq handler will be called, whether your 
particular hardware is idle or not.

So if you tear down data structures that the interrupt handler needs, you 
_ABSOLUTELY_ must first unregister the whole interrupt.

Also, even if there are no shared interrupts or any other devices, there 
can easily be old pending interrupts still queued up on IO-APIC's etc. So 
even though you quiesce the hardware, there is no guarantee that there 
aren't some pending interrupts that happened just before you turned off 
the interrupt from the hardware side, and are still "en route" to the CPU.

Which gets us exactly the same rule as if there were shared interrupts: if 
your interrupt handler depends on some data structure, you must tear down 
the interrupt handler _before_ you tear down the data structures it 
depends on (and in the reverse order when setting things up, of course).

> If we uninstall the IRQ first we i915_gem_idle probably
> won't work anymore, since it queues an interrupt and waits for it.

So then you'd better fix that. Because the code as is is very 
fundamentally buggy.

> Eric, any thoughts on this?  We shouldn't be racing to queue new work
> after the idle call since we suspend GEM at that point, so we must be
> failing to manage our active lists properly somehow?

See my previous email. The bug is that you do

  i915_gem_cleanup_ringbuffer ->
    i915_gem_cleanup_hws ->
      dev_priv->hw_status_page = NULL;

while interrupts are still enabled and coming in. And the interrupt path 
wants to access that hw_status_page. Which you just destroyed.

			Linus

  reply	other threads:[~2009-09-08 19:26 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-06 17:15 2.6.31-rc9: Reported regressions from 2.6.30 Rafael J. Wysocki
2009-09-06 17:15 ` [Bug #13645] NULL pointer dereference at (null) (level2_spare_pgt) Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13836] suspend script fails, related to stdout? Rafael J. Wysocki
2009-09-07  3:28   ` Tomas M.
     [not found]     ` <4AA47DF8.80302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-09-10 21:05       ` Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13809] oprofile: possible circular locking dependency detected Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13869] Radeon framebuffer (w/o KMS) corruption at boot Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13740] X server crashes with 2.6.31-rc2 when options are changed Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13819] system freeze when switching to console Rafael J. Wysocki
2009-09-08 16:29   ` reinette chatre
2009-09-08 17:00     ` Linus Torvalds
     [not found]       ` <alpine.LFD.2.01.0909080943030.7458-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-09-08 17:36         ` reinette chatre
2009-09-08 18:06           ` Linus Torvalds
     [not found]             ` <alpine.LFD.2.01.0909081039300.7458-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-09-08 18:20               ` Jesse Barnes
2009-09-08 19:26                 ` Linus Torvalds [this message]
     [not found]                   ` <alpine.LFD.2.01.0909081219130.7458-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-09-08 19:31                     ` Jesse Barnes
2009-09-08 22:06                       ` Linus Torvalds
     [not found]                         ` <alpine.LFD.2.01.0909081502510.7458-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-09-08 22:11                           ` Jesse Barnes
2009-09-08 23:36                             ` Linus Torvalds
2009-09-08 23:45                               ` Jesse Barnes
2009-09-08 23:05                         ` Jesse Barnes
2009-09-08 23:56                           ` reinette chatre
2009-09-08 19:19               ` Linus Torvalds
2009-09-08 22:37               ` reinette chatre
2009-09-08 23:16                 ` Jesse Barnes
2009-09-08 23:27                   ` reinette chatre
2009-09-08 17:24   ` Jesse Barnes
2009-09-06 17:24 ` [Bug #13733] 2.6.31-rc2: irq 16: nobody cared Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13906] Huawei E169 GPRS connection causes Ooops Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13935] 2.6.31-rcX breaks Apple MightyMouse (Bluetooth version) Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13940] iwlagn and sky2 stopped working, ACPI-related Rafael J. Wysocki
2009-09-06 20:55   ` Ricardo Jorge da Fonseca Marques Ferreira
2009-09-06 21:11     ` Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13942] Troubles with AoE and uninitialized object Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13941] x86 Geode issue Rafael J. Wysocki
2009-09-06 20:30   ` Martin-Éric Racine
     [not found]     ` <11fae7c70909061330h11c33ef3vc8ed4b7a0778874e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-06 21:12       ` Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13943] WARNING: at net/mac80211/mlme.c:2292 with ath5k Rafael J. Wysocki
2009-09-08 19:30   ` Fabio Comolli
     [not found]     ` <b637ec0b0909081230y1b9d2abbo258662343cca7932-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-10 21:09       ` Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13947] Libertas: Association request to the driver failed Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13987] Received NMI interrupt at resume Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13950] Oops when USB Serial disconnected while in use Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #13948] ath5k broken after suspend-to-ram Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14013] hd don't show up Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14018] kernel freezes, inotify problem Rafael J. Wysocki
2009-09-06 21:37   ` Eric Paris
2009-09-06 21:51     ` Rafael J. Wysocki
     [not found]       ` <200909062351.02664.rjw-KKrjLPT3xs0@public.gmane.org>
2009-09-09  5:58         ` Christoph Thielecke
2009-09-06 17:24 ` [Bug #14017] _end symbol missing from Symbol.map Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14058] Oops in fsnotify Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14070] lockdep warning triggered by dup_fd Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14043] System sometimes hangs during boot Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14103] cdc_acm gives I/O error Rafael J. Wysocki
2009-09-09 16:49   ` Stefan Schmidt
2009-09-06 17:24 ` [Bug #14095] Asus EeePC 1005HA-M: Suspend hangs and disables the wireless Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14133] WARNING: at arch/x86/kernel/smp.c:117 native_smp_send_reschedule Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14114] Tuning a saa7134 based card is broken in kernel 2.6.31-rc7 Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14135] NULL pointer dereference in ima_counts_put Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14138] Regression in suspend to ram Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14136] readcd Oops Rafael J. Wysocki
2009-09-07  5:38   ` Bob Tracy
     [not found]     ` <20090907053833.GA15287-GsGdjl1a1FBK+8ot1e1MDQ@public.gmane.org>
2009-09-10 21:11       ` Rafael J. Wysocki
     [not found]         ` <200909102311.26544.rjw-KKrjLPT3xs0@public.gmane.org>
2009-09-11  5:02           ` Bob Tracy
2009-09-06 17:24 ` [Bug #14137] usb console regressions Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14140] 2.6.31-rc9 breaks gianfar Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14141] order 2 page allocation failures Rafael J. Wysocki
2009-09-09 15:22   ` Mel Gorman
     [not found]     ` <20090909152206.GJ24614-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>
2009-09-10 21:14       ` Rafael J. Wysocki
2009-09-06 17:24 ` [Bug #14139] Output to external monitor is broken Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2009-08-25 20:00 2.6.31-rc7-git2: Reported regressions from 2.6.30 Rafael J. Wysocki
2009-08-25 20:34 ` [Bug #13819] system freeze when switching to console Rafael J. Wysocki
2009-08-19 20:20 2.6.31-rc6-git5: Reported regressions from 2.6.30 Rafael J. Wysocki
2009-08-19 20:26 ` [Bug #13819] system freeze when switching to console Rafael J. Wysocki
2009-08-19 23:35   ` reinette chatre
2009-08-20 14:55     ` Rafael J. Wysocki
2009-08-09 20:36 2.6.31-rc5-git5: Reported regressions from 2.6.30 Rafael J. Wysocki
2009-08-09 20:44 ` [Bug #13819] system freeze when switching to console Rafael J. Wysocki
2009-08-02 18:49 2.6.31-rc5: Reported regressions from 2.6.30 Rafael J. Wysocki
2009-08-02 18:58 ` [Bug #13819] system freeze when switching to console Rafael J. Wysocki
2009-07-26 20:23 2.6.31-rc4: Reported regressions from 2.6.30 Rafael J. Wysocki
2009-07-26 20:28 ` [Bug #13819] system freeze when switching to console Rafael J. Wysocki

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=alpine.LFD.2.01.0909081219130.7458@localhost.localdomain \
    --to=torvalds-de/tnxtf+jlsfhdxvbkv3wd2fqjk+8+b@public.gmane.org \
    --cc=bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r@public.gmane.org \
    --cc=eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org \
    --cc=jbarnes-Y1mF5jBUw70BENJcbMCuUQ@public.gmane.org \
    --cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ling.ma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=reinette.chatre-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=rjw-KKrjLPT3xs0@public.gmane.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