Skip to content

Commit

Permalink
NVMe: within nvme_free_queues(), delete RCU sychro/deferred free
Browse files Browse the repository at this point in the history
Converting from to blk-queue got rid of the driver's RCU
locking-on-queue, so removing unnecessary RCU locking-on-queue
artefacts.

Reviewed-by: Keith Busch <keith.busch@intel.com>

Signed-off-by: Kelly Nicole Kaoudis <kaoudis@colorado.edu>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
kaoudis authored and Jens Axboe committed Jan 22, 2015
1 parent 227290b commit 121c7ad
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/block/nvme-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,21 +1108,14 @@ static void nvme_free_queue(struct nvme_queue *nvmeq)

static void nvme_free_queues(struct nvme_dev *dev, int lowest)
{
LLIST_HEAD(q_list);
struct nvme_queue *nvmeq, *next;
struct llist_node *entry;
int i;

for (i = dev->queue_count - 1; i >= lowest; i--) {
struct nvme_queue *nvmeq = dev->queues[i];
llist_add(&nvmeq->node, &q_list);
dev->queue_count--;
dev->queues[i] = NULL;
}
synchronize_rcu();
entry = llist_del_all(&q_list);
llist_for_each_entry_safe(nvmeq, next, entry, node)
nvme_free_queue(nvmeq);
}
}

/**
Expand Down

0 comments on commit 121c7ad

Please sign in to comment.