Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286284
b: refs/heads/master
c: 9ecdc94
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Wilcox committed Nov 4, 2011
1 parent 47a23a1 commit 7e7cbc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3cb967c03926edd2c414082f4cc0feb7b372edae
refs/heads/master: 9ecdc946212f7cd592986b2c519b470404caa6b8
12 changes: 6 additions & 6 deletions trunk/drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,7 @@ static void cancel_cmdid_data(struct nvme_queue *nvmeq, int cmdid)

static struct nvme_queue *get_nvmeq(struct nvme_ns *ns)
{
int qid, cpu = get_cpu();
if (cpu < ns->dev->queue_count)
qid = cpu + 1;
else
qid = (cpu % rounddown_pow_of_two(ns->dev->queue_count)) + 1;
return ns->dev->queues[qid];
return ns->dev->queues[get_cpu() + 1];
}

static void put_nvmeq(struct nvme_queue *nvmeq)
Expand Down Expand Up @@ -1316,6 +1311,11 @@ static int __devinit nvme_setup_io_queues(struct nvme_dev *dev)
dev->queue_count++;
}

for (; i < num_possible_cpus(); i++) {
int target = i % rounddown_pow_of_two(dev->queue_count - 1);
dev->queues[i + 1] = dev->queues[target + 1];
}

return 0;
}

Expand Down

0 comments on commit 7e7cbc6

Please sign in to comment.