Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Sep 2016 22:27:47 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@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: r305250 - stable/11/sys/kern
Message-ID:  <201609012227.u81MRlFu089753@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Thu Sep  1 22:27:47 2016
New Revision: 305250
URL: https://svnweb.freebsd.org/changeset/base/305250

Log:
  MFC r305108,305109:
  Refix operation on sparse CPU mappings as in r302372, temporarily broken
  by r304716.
  
  PR:		kern/210106

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	Thu Sep  1 22:24:30 2016	(r305249)
+++ stable/11/sys/kern/subr_gtaskqueue.c	Thu Sep  1 22:27:47 2016	(r305250)
@@ -742,7 +742,7 @@ _taskqgroup_adjust(struct taskqgroup *qg
 	LIST_HEAD(, grouptask) gtask_head = LIST_HEAD_INITIALIZER(NULL);
 	cpuset_t mask;
 	struct grouptask *gtask;
-	int i, old_cnt, qid;
+	int i, k, old_cnt, qid, cpu;
 
 	mtx_assert(&qgroup->tqg_lock, MA_OWNED);
 
@@ -806,8 +806,11 @@ _taskqgroup_adjust(struct taskqgroup *qg
 	/*
 	 * Set new CPU and IRQ affinity
 	 */
+	cpu = CPU_FIRST();
 	for (i = 0; i < cnt; i++) {
-		qgroup->tqg_queue[i].tgc_cpu = i * qgroup->tqg_stride;
+		qgroup->tqg_queue[i].tgc_cpu = cpu;
+		for (k = 0; k < qgroup->tqg_stride; k++)
+			cpu = CPU_NEXT(cpu);
 		CPU_ZERO(&mask);
 		CPU_SET(qgroup->tqg_queue[i].tgc_cpu, &mask);
 		LIST_FOREACH(gtask, &qgroup->tqg_queue[i].tgc_tasks, gt_list) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609012227.u81MRlFu089753>