Date: Wed, 19 Oct 2016 21:01:25 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307657 - head/sys/kern Message-ID: <201610192101.u9JL1PW4042114@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Wed Oct 19 21:01:24 2016 New Revision: 307657 URL: https://svnweb.freebsd.org/changeset/base/307657 Log: Resolve whitespace diff to NextBSD. Check to see that the taskqueue thread count requires us to acutally iterate over the thread count to bind to cpus. Submitted by: mmacy@nextbsd.org Modified: head/sys/kern/subr_gtaskqueue.c Modified: head/sys/kern/subr_gtaskqueue.c ============================================================================== --- head/sys/kern/subr_gtaskqueue.c Wed Oct 19 20:56:21 2016 (r307656) +++ head/sys/kern/subr_gtaskqueue.c Wed Oct 19 21:01:24 2016 (r307657) @@ -52,7 +52,6 @@ static MALLOC_DEFINE(M_GTASKQUEUE, "task static void gtaskqueue_thread_enqueue(void *); static void gtaskqueue_thread_loop(void *arg); - struct gtaskqueue_busy { struct gtask *tb_running; TAILQ_ENTRY(gtaskqueue_busy) tb_link; @@ -655,11 +654,11 @@ taskqgroup_attach_deferred(struct taskqg if (gtask->gt_irq != -1) { mtx_unlock(&qgroup->tqg_lock); - CPU_ZERO(&mask); - CPU_SET(cpu, &mask); - intr_setaffinity(gtask->gt_irq, &mask); + CPU_ZERO(&mask); + CPU_SET(cpu, &mask); + intr_setaffinity(gtask->gt_irq, &mask); - mtx_lock(&qgroup->tqg_lock); + mtx_lock(&qgroup->tqg_lock); } qgroup->tqg_queue[qid].tgc_cnt++; @@ -789,6 +788,9 @@ taskqgroup_bind(struct taskqgroup *qgrou * Bind taskqueue threads to specific CPUs, if they have been assigned * one. */ + if (qgroup->tqg_cnt == 1) + return; + for (i = 0; i < qgroup->tqg_cnt; i++) { gtask = malloc(sizeof (*gtask), M_DEVBUF, M_WAITOK); GTASK_INIT(>ask->bt_task, 0, 0, taskqgroup_binder, gtask); @@ -855,7 +857,6 @@ _taskqgroup_adjust(struct taskqgroup *qg LIST_INSERT_HEAD(>ask_head, gtask, gt_list); } } - mtx_unlock(&qgroup->tqg_lock); while ((gtask = LIST_FIRST(>ask_head))) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610192101.u9JL1PW4042114>