From owner-svn-src-head@FreeBSD.ORG Sat May 24 13:00:50 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A77164A; Sat, 24 May 2014 13:00:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8816E29B2; Sat, 24 May 2014 13:00:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4OD0oTd083625; Sat, 24 May 2014 13:00:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4OD0oDX083623; Sat, 24 May 2014 13:00:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201405241300.s4OD0oDX083623@svn.freebsd.org> From: Alexander Motin Date: Sat, 24 May 2014 13:00:50 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2014 13:00:50 -0000 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);