diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-07-05 12:10:11 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-07-05 12:10:11 +0000 |
commit | 78cb2532be3115ceffb7b842509a0eb79206ec82 (patch) | |
tree | f9bbf2a7599a517ea75eab02c5c14babe623b12d | |
parent | b837ed9b539bec9feadeb0c3b05cf12cd6b4b114 (diff) |
Use multi-threaded task queues to prevent deadlocks in the case where a
tasks sleeps and expects to be woken up by a task that will be submitted
to the same task queue. That scenario happens in the output hotplug code.
We probably should spend some time on tuning the number of threads but
let's make things work correctly first.
Based on some serious debugging done by Sven M. Hallberg.
ok jsg@
-rw-r--r-- | sys/dev/pci/drm/drm_linux.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_hotplug.c | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c index 0b86912cb72..1c5405071ca 100644 --- a/sys/dev/pci/drm/drm_linux.c +++ b/sys/dev/pci/drm/drm_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.c,v 1.38 2019/06/09 12:58:30 kettenis Exp $ */ +/* $OpenBSD: drm_linux.c,v 1.39 2019/07/05 12:10:10 kettenis Exp $ */ /* * Copyright (c) 2013 Jonathan Gray <jsg@openbsd.org> * Copyright (c) 2015, 2016 Mark Kettenis <kettenis@openbsd.org> @@ -1399,15 +1399,15 @@ drm_linux_init(void) { if (system_wq == NULL) { system_wq = (struct workqueue_struct *) - taskq_create("drmwq", 1, IPL_HIGH, 0); + taskq_create("drmwq", 4, IPL_HIGH, 0); } if (system_unbound_wq == NULL) { system_unbound_wq = (struct workqueue_struct *) - taskq_create("drmubwq", 1, IPL_HIGH, 0); + taskq_create("drmubwq", 4, IPL_HIGH, 0); } if (system_long_wq == NULL) { system_long_wq = (struct workqueue_struct *) - taskq_create("drmlwq", 1, IPL_HIGH, 0); + taskq_create("drmlwq", 4, IPL_HIGH, 0); } if (taskletq == NULL) diff --git a/sys/dev/pci/drm/i915/intel_hotplug.c b/sys/dev/pci/drm/i915/intel_hotplug.c index 0ed2bad1348..9a801813023 100644 --- a/sys/dev/pci/drm/i915/intel_hotplug.c +++ b/sys/dev/pci/drm/i915/intel_hotplug.c @@ -619,7 +619,6 @@ void intel_hpd_init_work(struct drm_i915_private *dev_priv) INIT_WORK(&dev_priv->hotplug.hotplug_work, i915_hotplug_work_func); INIT_WORK(&dev_priv->hotplug.dig_port_work, i915_digport_work_func); INIT_WORK(&dev_priv->hotplug.poll_init_work, i915_hpd_poll_init_work); - dev_priv->hotplug.poll_init_work.tq = systq; INIT_DELAYED_WORK(&dev_priv->hotplug.reenable_work, intel_hpd_irq_storm_reenable_work); } |