Thread (42 messages) 42 messages, 5 authors, 2018-11-29

Re: [PATCH 2/8] block: improve logic around when to sort a plug list

From: Jens Axboe <axboe@kernel.dk>
Date: 2018-11-28 00:16:22
Also in: linux-nvme

On 11/27/18 5:05 PM, Omar Sandoval wrote:
quoted
+static void blk_add_rq_to_plug(struct blk_plug *plug, struct request *rq)
+{
+	list_add_tail(&rq->queuelist, &plug->mq_list);
+	plug->rq_count++;
+	if (!plug->multiple_queues && !list_is_singular(&plug->mq_list)) {
+		struct request *tmp;
+
+		tmp = list_first_entry(&plug->mq_list, struct request,
+						queuelist);
+		if (tmp->q != rq->q)
+			plug->multiple_queues = true;
Actually, I thought we want to sort whenever there are different
software/hardware queues on the plug list, even if they're on the same
queue?
That was the original intent, but with the tons of testing I've done
lately, the cost of sorting batches is higher than the cost we pay for
having to do multiple inserts. So I think the only sane case is >= 3
requests, and multiple queues.

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help