* [PATCH] drm/i915: Expose a debugfs to acquire the BKL^Wstruct_mutex
@ 2017-08-15 23:40 Chris Wilson
2017-08-16 0:50 ` ✓ Fi.CI.BAT: success for " Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2017-08-15 23:40 UTC (permalink / raw)
To: intel-gfx
To demonstrate how pervasive an issue our BKL is, aka struct_mutex,
provide a debugfs file whose sole purpose is to hold the struct_mutex.
To make matters worse, it does not even partake in the backoff required
for resets, so the likely event of holding the file open will be to
wedge the driver. Hopefully, this should prove instrumental in the
crusade to eradicate the BKL and transition to fine-grained locking and
much smoother multi-client behaviour.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 329fb3649dc3..0af11dcca160 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -4709,6 +4709,27 @@ static const struct file_operations i915_forcewake_fops = {
.release = i915_forcewake_release,
};
+static int BKL_struct_mutex_open(struct inode *inode, struct file *file)
+{
+ struct drm_i915_private *i915 = inode->i_private;
+
+ return mutex_lock_interruptible(&i915->drm.struct_mutex);
+}
+
+static int BKL_struct_mutex_release(struct inode *inode, struct file *file)
+{
+ struct drm_i915_private *i915 = inode->i_private;
+
+ mutex_unlock(&i915->drm.struct_mutex);
+ return 0;
+}
+
+static const struct file_operations BKL_struct_mutex_fops = {
+ .owner = THIS_MODULE,
+ .open = BKL_struct_mutex_open,
+ .release = BKL_struct_mutex_release,
+};
+
static int i915_hpd_storm_ctl_show(struct seq_file *m, void *data)
{
struct drm_i915_private *dev_priv = m->private;
@@ -4879,6 +4900,12 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv)
if (!ent)
return -ENOMEM;
+ ent = debugfs_create_file("BKL_struct_mutex", S_IRUSR,
+ minor->debugfs_root, to_i915(minor->dev),
+ &BKL_struct_mutex_fops);
+ if (!ent)
+ return -ENOMEM;
+
ret = intel_pipe_crc_create(minor);
if (ret)
return ret;
--
2.13.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Expose a debugfs to acquire the BKL^Wstruct_mutex
2017-08-15 23:40 [PATCH] drm/i915: Expose a debugfs to acquire the BKL^Wstruct_mutex Chris Wilson
@ 2017-08-16 0:50 ` Patchwork
0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2017-08-16 0:50 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Expose a debugfs to acquire the BKL^Wstruct_mutex
URL : https://patchwork.freedesktop.org/series/28839/
State : success
== Summary ==
Series 28839v1 drm/i915: Expose a debugfs to acquire the BKL^Wstruct_mutex
https://patchwork.freedesktop.org/api/1.0/series/28839/revisions/1/mbox/
Test kms_flip:
Subgroup basic-flip-vs-modeset:
pass -> SKIP (fi-skl-x1585l) fdo#101781
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-a:
pass -> DMESG-WARN (fi-pnv-d510) fdo#101597
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-byt-n2820) fdo#101705
fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781
fdo#101597 https://bugs.freedesktop.org/show_bug.cgi?id=101597
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705
fi-bdw-5557u total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:431s
fi-bdw-gvtdvm total:279 pass:265 dwarn:0 dfail:0 fail:0 skip:14 time:425s
fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:396s
fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:501s
fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:492s
fi-byt-j1900 total:279 pass:254 dwarn:1 dfail:0 fail:0 skip:24 time:487s
fi-byt-n2820 total:279 pass:250 dwarn:1 dfail:0 fail:0 skip:28 time:462s
fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:585s
fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:426s
fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:408s
fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:402s
fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:493s
fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:462s
fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:460s
fi-kbl-7560u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:576s
fi-kbl-r total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:583s
fi-pnv-d510 total:279 pass:222 dwarn:2 dfail:0 fail:0 skip:55 time:486s
fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:441s
fi-skl-6700k total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:637s
fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:459s
fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:424s
fi-skl-x1585l total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:467s
fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:536s
fi-snb-2600 total:279 pass:250 dwarn:0 dfail:0 fail:0 skip:29 time:400s
5118c7fa9c878351d1ed17a36b97966f68da72df drm-tip: 2017y-08m-15d-23h-58m-24s UTC integration manifest
2b3315684b48 drm/i915: Expose a debugfs to acquire the BKL^Wstruct_mutex
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5410/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-16 0:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-15 23:40 [PATCH] drm/i915: Expose a debugfs to acquire the BKL^Wstruct_mutex Chris Wilson
2017-08-16 0:50 ` ✓ Fi.CI.BAT: success for " Patchwork
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.