svn commit: r305108 - head/sys/kern
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Wed Aug 31 04:02:54 UTC 2016
Author: nwhitehorn
Date: Wed Aug 31 04:02:52 2016
New Revision: 305108
URL: https://svnweb.freebsd.org/changeset/base/305108
Log:
Refix operation on sparse CPU mappings as in r302372, temporarily broken
by r304716.
PR: kern/210106
MFC after: 2 days
Modified:
head/sys/kern/imgact_elf.c
head/sys/kern/subr_gtaskqueue.c
Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c Wed Aug 31 03:55:50 2016 (r305107)
+++ head/sys/kern/imgact_elf.c Wed Aug 31 04:02:52 2016 (r305108)
@@ -1105,6 +1105,9 @@ __elfN(freebsd_fixup)(register_t **stack
AUXARGS_ENTRY(pos, AT_TIMEKEEP,
imgp->sysent->sv_timekeep_base);
}
+#ifdef AT_HWCAP
+ AUXARGS_ENTRY(pos, AT_HWCAP, cpu_features);
+#endif
AUXARGS_ENTRY(pos, AT_STACKPROT, imgp->sysent->sv_shared_page_obj
!= NULL && imgp->stack_prot != 0 ? imgp->stack_prot :
imgp->sysent->sv_stackprot);
Modified: head/sys/kern/subr_gtaskqueue.c
==============================================================================
--- head/sys/kern/subr_gtaskqueue.c Wed Aug 31 03:55:50 2016 (r305107)
+++ head/sys/kern/subr_gtaskqueue.c Wed Aug 31 04:02:52 2016 (r305108)
@@ -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) {
More information about the svn-src-head
mailing list