Date: Fri, 2 Feb 2018 18:04:57 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r328801 - stable/11/sys/kern Message-ID: <201802021804.w12I4vgp011062@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Fri Feb 2 18:04:57 2018 New Revision: 328801 URL: https://svnweb.freebsd.org/changeset/base/328801 Log: MFC r307657 (by sbruno): 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. Modified: stable/11/sys/kern/subr_gtaskqueue.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_gtaskqueue.c ============================================================================== --- stable/11/sys/kern/subr_gtaskqueue.c Fri Feb 2 18:03:14 2018 (r328800) +++ stable/11/sys/kern/subr_gtaskqueue.c Fri Feb 2 18:04:57 2018 (r328801) @@ -656,11 +656,11 @@ taskqgroup_attach_deferred(struct taskqgroup *qgroup, 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++; @@ -790,6 +790,9 @@ taskqgroup_bind(struct taskqgroup *qgroup) * 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); @@ -856,7 +859,6 @@ _taskqgroup_adjust(struct taskqgroup *qgroup, int cnt, 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?201802021804.w12I4vgp011062>