Date: Thu, 21 Oct 2004 16:02:44 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 63475 for review Message-ID: <200410211602.i9LG2iFv049263@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=63475 Change 63475 by jhb@jhb_slimer on 2004/10/21 16:02:43 Revert the taskqueue profiling stuff. Affected files ... .. //depot/projects/smpng/sys/kern/subr_taskqueue.c#23 edit .. //depot/projects/smpng/sys/sys/_task.h#5 edit Differences ... ==== //depot/projects/smpng/sys/kern/subr_taskqueue.c#23 (text+ko) ==== @@ -36,16 +36,9 @@ #include <sys/lock.h> #include <sys/malloc.h> #include <sys/mutex.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; @@ -147,9 +140,6 @@ return 0; } - getnanotime(&task->ta_queuetime); - tq_in++; - /* * Optimise the case when all tasks have the same priority. */ @@ -182,7 +172,6 @@ taskqueue_run(struct taskqueue *queue) { struct task *task; - struct timespec tv; int owned, pending; owned = mtx_owned(&queue->tq_mutex); @@ -198,15 +187,7 @@ pending = task->ta_pending; task->ta_pending = 0; task->ta_flags |= TAF_PENDING; - tq_out++; - getnanotime(&tv); - timespecsub(&tv, &task->ta_queuetime); mtx_unlock(&queue->tq_mutex); - 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); ==== //depot/projects/smpng/sys/sys/_task.h#5 (text+ko) ==== @@ -46,7 +46,6 @@ task_fn_t *ta_func; /* task handler */ void *ta_context; /* argument for handler */ int ta_flags; /* Flags */ - struct timespec ta_queuetime; /* time enqueued */ }; #define TAF_PENDING 0x1 /* Task is being run now */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410211602.i9LG2iFv049263>