Spell hierarchy correctly in comments.
Submitted by: Wojciech A. Koszek dunstan at freebsd dot czest dot pl
This commit is contained in:
parent
3924da21a3
commit
971d0ad835
@ -37,9 +37,16 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/taskqueue.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/unistd.h>
|
||||
|
||||
int tq_in;
|
||||
SYSCTL_INT(_kern, OID_AUTO, tq_in, CTLFLAG_RD, &tq_in, 0, "");
|
||||
int tq_out;
|
||||
SYSCTL_INT(_kern, OID_AUTO, tq_out, CTLFLAG_RD, &tq_out, 0, "");
|
||||
|
||||
static MALLOC_DEFINE(M_TASKQUEUE, "taskqueue", "Task Queues");
|
||||
static void *taskqueue_giant_ih;
|
||||
static void *taskqueue_ih;
|
||||
@ -166,6 +173,9 @@ taskqueue_enqueue(struct taskqueue *queue, struct task *task)
|
||||
return 0;
|
||||
}
|
||||
|
||||
getnanotime(&task->ta_queuetime);
|
||||
tq_in++;
|
||||
|
||||
/*
|
||||
* Optimise the case when all tasks have the same priority.
|
||||
*/
|
||||
@ -197,6 +207,7 @@ void
|
||||
taskqueue_run(struct taskqueue *queue)
|
||||
{
|
||||
struct task *task;
|
||||
struct timespec tv;
|
||||
int owned, pending;
|
||||
|
||||
owned = mtx_owned(&queue->tq_mutex);
|
||||
@ -212,8 +223,16 @@ taskqueue_run(struct taskqueue *queue)
|
||||
pending = task->ta_pending;
|
||||
task->ta_pending = 0;
|
||||
queue->tq_running = task;
|
||||
tq_out++;
|
||||
mtx_unlock(&queue->tq_mutex);
|
||||
|
||||
getnanotime(&tv);
|
||||
timespecsub(&tv, &task->ta_queuetime);
|
||||
if (tv.tv_nsec >= 0500000000) {
|
||||
printf("taskqueue_run: warning, queue time of %d.%09ld "
|
||||
"for context %p\n", tv.tv_sec, tv.tv_nsec,
|
||||
task->ta_func);
|
||||
}
|
||||
task->ta_func(task->ta_context, pending);
|
||||
|
||||
mtx_lock(&queue->tq_mutex);
|
||||
|
@ -205,7 +205,7 @@ SYSCTL_PROC(_debug_witness, OID_AUTO, watch, CTLFLAG_RW | CTLTYPE_INT, NULL, 0,
|
||||
/*
|
||||
* When KDB is enabled and witness_kdb is set to 1, it will cause the system
|
||||
* to drop into kdebug() when:
|
||||
* - a lock heirarchy violation occurs
|
||||
* - a lock hierarchy violation occurs
|
||||
* - locks are held when going to sleep.
|
||||
*/
|
||||
#ifdef WITNESS_KDB
|
||||
@ -219,7 +219,7 @@ SYSCTL_INT(_debug_witness, OID_AUTO, kdb, CTLFLAG_RW, &witness_kdb, 0, "");
|
||||
/*
|
||||
* When KDB is enabled and witness_trace is set to 1, it will cause the system
|
||||
* to print a stack trace:
|
||||
* - a lock heirarchy violation occurs
|
||||
* - a lock hierarchy violation occurs
|
||||
* - locks are held when going to sleep.
|
||||
*/
|
||||
int witness_trace = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user