Date: Wed, 16 Oct 2013 12:13:20 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r256622 - projects/camlock/sys/cam Message-ID: <201310161213.r9GCDKeP094037@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Oct 16 12:13:20 2013 New Revision: 256622 URL: http://svnweb.freebsd.org/changeset/base/256622 Log: Prohibit sleeping in CAM completion threads. We have limited number of them same as interrupt threads. We don't want somebody carelessly blocked all CAM subsystem by arbitrary sleep. Modified: projects/camlock/sys/cam/cam_xpt.c Modified: projects/camlock/sys/cam/cam_xpt.c ============================================================================== --- projects/camlock/sys/cam/cam_xpt.c Wed Oct 16 11:53:03 2013 (r256621) +++ projects/camlock/sys/cam/cam_xpt.c Wed Oct 16 12:13:20 2013 (r256622) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include <sys/conf.h> #include <sys/fcntl.h> #include <sys/interrupt.h> +#include <sys/proc.h> #include <sys/sbuf.h> #include <sys/smp.h> #include <sys/taskqueue.h> @@ -5264,6 +5265,7 @@ xpt_done_td(void *arg) STAILQ_HEAD(, ccb_hdr) doneq; STAILQ_INIT(&doneq); + THREAD_NO_SLEEPING(); mtx_lock(&queue->cam_doneq_mtx); while (1) { while (STAILQ_EMPTY(&queue->cam_doneq)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310161213.r9GCDKeP094037>