All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@myrealbox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dave Airlie <airlied@linux.ie>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Zhao Yakui <yakui.zhao@intel.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Adam Jackson <ajax@redhat.com>,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	linux-kernel@vger.kernel.org
Subject: Re: Intel graphics CPU usage - SDVO detect bogosity?
Date: Mon, 16 Aug 2010 00:06:03 -0400	[thread overview]
Message-ID: <4C68B92B.3080406@myrealbox.com> (raw)
In-Reply-To: <AANLkTi=NFpeyo7Q31yMfqKSP2c-2OS2ccqa=Q9CQ8bpk@mail.gmail.com>

Linus Torvalds wrote:
> I started wondering why 'top' was showing an otherwise idle system as
> having a load average of 0.5+, and worker threads constantly using the
> CPU.
> 
> So I did a system-wide profile, and got the attached output (look at
> it in a really wide terminal).
> 
> There seems to be something _seriously_ wrong with i915 SDVO detect.
> This is on an Apple Mac Mini (hey, your favorite problem child!), and
> apparently it spends 20% of its non-idle CPU time just doing udelay's
> for the i2c SDVO connection detection.

You might be hitting the infamous hotplug storm [1].  The symptoms vary 
by kernel version.

2.6.34 and before: udevadm --monitor shows craploads of events and, as 
long as X is running, X keeps reprobing the outputs which (depending on 
the particular bug) can suck cpu in the i2c code or cause more hotplug 
events.  It also makes X oddly laggy.

2.6.35 and newer: The kernel is smart enough to probe outputs itself 
before telling X, so the events never hit userspace.  But things still 
can get a bit laggy.

Anyone know why merely *reading* /sys/class/drm/whatever/status causes 
the output to get probed?  (I see it in the code, but I have no idea why 
that code's still there after most of the rest of the hotplug code got 
cleaned up in 2.6.36).

Once I find some free time, I plan on trying to at least fix the issue 
that causes this bug for me.  (It's apparently quite nontrivial due to 
silliness in the way dock/undock (!) works on some laptops.)


[1] for example: 
http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg00921.html

> 
> That sounds a bit wrong, doesn't it?
> 
> I don't know how recent this is - it might have been going on for some
> time without me noticing. It's the wife's computer, and the same thing
> doesn't seem to happen on my Core i5 desktop
> 
> Any ideas? Any information I can give about the machine?

If I'm right, the outputs of intel_bios_dumper and intel_bios_reader 
could be instructive (both are in intel-gpu-tools).

You could also try intel_reg_write 0x61110 0x0 and see if the problem 
stops (at least until a suspend/resume cycle).  That command turns off 
output hotplug on the card, which has the side effect that the kernel 
will stop acting on bogus interrupts.

--Andy

  parent reply	other threads:[~2010-08-16  4:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16  2:32 Intel graphics CPU usage - SDVO detect bogosity? Linus Torvalds
2010-08-16  2:51 ` Markus Trippelsdorf
2010-08-16  2:51   ` Markus Trippelsdorf
2010-08-16  3:30 ` Dave Airlie
2010-08-16  3:30   ` Dave Airlie
2010-08-16  4:01   ` Linus Torvalds
2010-08-16  4:29     ` Dave Airlie
2010-08-16  4:06 ` Andy Lutomirski [this message]
2010-08-16  4:27   ` Linus Torvalds
2010-08-16  4:27     ` Linus Torvalds
2010-08-16 14:27     ` Andy Lutomirski
2010-08-16 15:13       ` [Intel-gfx] " Adam Jackson

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=4C68B92B.3080406@myrealbox.com \
    --to=luto@myrealbox.com \
    --cc=airlied@linux.ie \
    --cc=ajax@redhat.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=yakui.zhao@intel.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 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.