linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Alberto Gonzalez <alberto6674@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>,
	Kay Sievers <kay.sievers@vrfy.org>,
	linux-kernel@vger.kernel.org, linux-hotplug@vger.kernel.org
Subject: Re: Kernel 2.6.30 and udevd problem
Date: Thu, 02 Jul 2009 16:35:47 +0000	[thread overview]
Message-ID: <20090702093547.7ca95116@jbarnes-g45> (raw)
In-Reply-To: <200907020818.58541.info@gnebu.es>

[-- Attachment #1: Type: text/plain, Size: 2763 bytes --]

On Thu, 2 Jul 2009 08:18:58 +0200
Alberto Gonzalez <alberto6674@gmail.com> wrote:

> On Wednesday 01 July 2009 19:22:14 Jesse Barnes wrote:
> > On Wed, 1 Jul 2009 09:09:03 +0200
> >
> > Alberto Gonzalez <alberto6674@gmail.com> wrote:
> > > On Tuesday 30 June 2009 18:08:35 Jesse Barnes wrote:
> > > > On Tue, 30 Jun 2009 04:46:38 +0100 (IST)
> > > >
> > > > Dave Airlie <airlied@linux.ie> wrote:
> > > > > > On Sunday 28 June 2009 16:28:44 Kay Sievers wrote:
> > > > > > > If there isn't something else running which acts on
> > > > > > > uevents that trigger drm events, which I wouldn't expect,
> > > > > > > it seems like a drm kernel problem.
> > > > > >
> > > > > > Ok, thanks for looking at it. I'll sum up the problem for
> > > > > > DRM people:
> > > > > >
> > > > > > The problem started after upgrading to 2.6.30. At some
> > > > > > point, udevd starts to use a lot of CPU time. It happens
> > > > > > randomly, but it seems easier to trigger when running
> > > > > > something graphics intensive (glxgears, gtkperf,
> > > > > > tuxracer..).
> > > > > >
> > > > > > Killing udevd and starting it with the --debug switch
> > > > > > throws up this when the problem starts:
> > > > >
> > > > > I've added jbarnes to the list,
> > > > >
> > > > > Jesses are we sending events yet? what for?
> > > >
> > > > Right now we just send uevents at hotplug time, so maybe one of
> > > > our hotplug interrupt bits is getting stuck, resulting in a
> > > > continuous stream of events as we generate other interrupts
> > > > (which would happen when running 3D apps for example).
> > > >
> > > > There's a DRM_DEBUG statement in drivers/gpu/drm/i915/i915_irq.c
> > > > under the if (I915_HAS_HOTPLUG(dev)) { check, if you make it
> > > > into DRM_ERROR we can see which one is getting stuck.
> > >
> > > I am afraid I'll need a bit more guidance here. I guess this means
> > > patching the kernel. Would it be possible to get a test patch
> > > against 2.6.30? And then after patching and compiling, how should
> > > I debug it?
> >
> > Here's a patch against git, it should apply to 2.6.30 though I
> > think.
> >
> > I'll just need your dmesg output from when the problem is occurring
> > (if I'm right this patch should flood your logs).
> 
> Thanks, the patch applied to 2.6.30 and when the problem stars I get
> these two lines repeated all the time in dmesg:
> 
> [drm:i915_driver_irq_handler] *ERROR* hotplug event received, stat
> 0x10200300 [drm:i915_driver_irq_handler] *ERROR* hotplug event
> received, stat 0x18200300
> 
> Is this enough or should I provide something else?

Interesting.  That hotplug status shouldn't end up generating any
uevents.  Can you try this patch to see what's going on?

-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #2: drm-uevent-debug.patch --]
[-- Type: text/x-patch, Size: 1282 bytes --]

diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 85ec31b..d4c6d82 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -456,6 +456,8 @@ void drm_sysfs_hotplug_event(struct drm_device *dev)
 	char *event_string = "HOTPLUG=1";
 	char *envp[] = { event_string, NULL };
 
+	WARN(1, "hotplug uevent\n");
+
 	DRM_DEBUG("generating hotplug event\n");
 
 	kobject_uevent_env(&dev->primary->kdev.kobj, KOBJ_CHANGE, envp);
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 228546f..29e1e4b 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -353,10 +353,12 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
 		    (iir & I915_DISPLAY_PORT_INTERRUPT)) {
 			u32 hotplug_status = I915_READ(PORT_HOTPLUG_STAT);
 
-			DRM_DEBUG("hotplug event received, stat 0x%08x\n",
-				  hotplug_status);
-			if (hotplug_status & dev_priv->hotplug_supported_mask)
+			if (hotplug_status & dev_priv->hotplug_supported_mask) {
+				DRM_DEBUG("hotplug event received: 0x%08x\n",
+					  hotplug_status &
+					  dev_priv->hotplug_supported_mask);
 				schedule_work(&dev_priv->hotplug_work);
+			}
 
 			I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status);
 			I915_READ(PORT_HOTPLUG_STAT);

  reply	other threads:[~2009-07-02 16:35 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-28  6:21 Kernel 2.6.30 and udevd problem Alberto Gonzalez
2009-06-28 10:37 ` Kay Sievers
2009-06-28 12:37   ` Alberto Gonzalez
2009-06-28 12:49     ` Kay Sievers
2009-06-28 14:22       ` Alberto Gonzalez
2009-06-28 14:28         ` Kay Sievers
2009-06-30  3:40           ` Alberto Gonzalez
2009-06-30  3:46             ` Dave Airlie
2009-06-30 16:08               ` Jesse Barnes
2009-07-01  7:09                 ` Alberto Gonzalez
2009-07-01 17:22                   ` Jesse Barnes
2009-07-02  6:18                     ` Alberto Gonzalez
2009-07-02 16:35                       ` Jesse Barnes [this message]
2009-07-02 19:37                         ` Alberto Gonzalez
2009-07-02 22:00                           ` Michal Soltys
2009-07-04 22:10                             ` Alberto Gonzalez
2009-07-20 18:10                               ` Jesse Barnes
2009-07-20 21:06                                 ` Alberto Gonzalez
     [not found]                                   ` <200907210048.37432.info@gnebu.es>
     [not found]                                     ` <200907221525.29507.info@gnebu.es>
2009-07-22 16:08                                       ` Jesse Barnes
     [not found]                                         ` <200907221851.20916.info@gnebu.es>
2009-07-22 17:12                                           ` Jesse Barnes
2009-07-22 18:43                                             ` Alberto Gonzalez
2009-07-22 19:17                                               ` Jesse Barnes
2009-07-22 19:44                                               ` Jesse Barnes
2009-07-22 20:00                                                 ` Alberto Gonzalez
2009-07-23  0:06                                                   ` Alberto Gonzalez
2009-08-06 13:53                                                     ` Alberto Gonzalez
2009-08-06 21:30                                                       ` Jesse Barnes
2009-08-06 22:17                                                         ` Alberto Gonzalez

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=20090702093547.7ca95116@jbarnes-g45 \
    --to=jbarnes@virtuousgeek.org \
    --cc=airlied@linux.ie \
    --cc=alberto6674@gmail.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-hotplug@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).