Date: Sat, 24 May 2014 13:00:50 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266615 - in head/sys/dev: mpr mps Message-ID: <201405241300.s4OD0oDX083623@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405241300.s4OD0oDX083623>