svn commit: r266615 - in head/sys/dev: mpr mps

Alexander Motin mav at FreeBSD.org
Sat May 24 13:00:50 UTC 2014


Author: mav
Date: Sat May 24 13:00:49 2014
New Revision: 266615
URL: http://svnweb.freebsd.org/changeset/base/266615

Log:
  Increase taskqueue thread priority from idle to PRIBIO.
  
  Idle priority is not even time-share, so if system is busy in any way,
  those events may never be executed.  Since in some cases system waits
  for events processed by that thread, that may cause deadlocks.

Modified:
  head/sys/dev/mpr/mpr_sas.c
  head/sys/dev/mps/mps_sas.c

Modified: head/sys/dev/mpr/mpr_sas.c
==============================================================================
--- head/sys/dev/mpr/mpr_sas.c	Sat May 24 12:16:33 2014	(r266614)
+++ head/sys/dev/mpr/mpr_sas.c	Sat May 24 13:00:49 2014	(r266615)
@@ -764,9 +764,7 @@ mpr_attach_sas(struct mpr_softc *sc)
 	TASK_INIT(&sassc->ev_task, 0, mprsas_firmware_event_work, sc);
 	sassc->ev_tq = taskqueue_create("mpr_taskq", M_NOWAIT | M_ZERO,
 	    taskqueue_thread_enqueue, &sassc->ev_tq);
-
-	/* Run the task queue with lowest priority */
-	taskqueue_start_threads(&sassc->ev_tq, 1, 255, "%s taskq", 
+	taskqueue_start_threads(&sassc->ev_tq, 1, PRIBIO, "%s taskq", 
 	    device_get_nameunit(sc->mpr_dev));
 
 	mpr_lock(sc);

Modified: head/sys/dev/mps/mps_sas.c
==============================================================================
--- head/sys/dev/mps/mps_sas.c	Sat May 24 12:16:33 2014	(r266614)
+++ head/sys/dev/mps/mps_sas.c	Sat May 24 13:00:49 2014	(r266615)
@@ -749,9 +749,7 @@ mps_attach_sas(struct mps_softc *sc)
 	TASK_INIT(&sassc->ev_task, 0, mpssas_firmware_event_work, sc);
 	sassc->ev_tq = taskqueue_create("mps_taskq", M_NOWAIT | M_ZERO,
 	    taskqueue_thread_enqueue, &sassc->ev_tq);
-
-	/* Run the task queue with lowest priority */
-	taskqueue_start_threads(&sassc->ev_tq, 1, 255, "%s taskq", 
+	taskqueue_start_threads(&sassc->ev_tq, 1, PRIBIO, "%s taskq", 
 	    device_get_nameunit(sc->mps_dev));
 
 	mps_lock(sc);


More information about the svn-src-head mailing list