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
This commit is contained in:
parent
dc8b629790
commit
026204b4c6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307657
@ -52,7 +52,6 @@ static MALLOC_DEFINE(M_GTASKQUEUE, "taskqueue", "Task Queues");
|
||||
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 taskqgroup *qgroup, struct grouptask *gtask)
|
||||
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 *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);
|
||||
@ -855,7 +857,6 @@ _taskqgroup_adjust(struct taskqgroup *qgroup, int cnt, int stride)
|
||||
LIST_INSERT_HEAD(>ask_head, gtask, gt_list);
|
||||
}
|
||||
}
|
||||
|
||||
mtx_unlock(&qgroup->tqg_lock);
|
||||
|
||||
while ((gtask = LIST_FIRST(>ask_head))) {
|
||||
|
Loading…
Reference in New Issue
Block a user