Thread (23 messages) 23 messages, 6 authors, 2021-02-10

Re: [PATCH 3/3] blk-mq: Use llist_head for blk_cpu_done

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2021-01-25 11:44:18
Also in: lkml

On 2021-01-25 08:30:12 [+0000], Christoph Hellwig wrote:
quoted
+static void blk_mq_complete_send_ipi(struct request *rq)
+{
+	struct llist_head *list;
+	unsigned int cpu;
+
+	cpu = rq->mq_ctx->cpu;
+	list = &per_cpu(blk_cpu_done, cpu);
+	if (llist_add(&rq->ipi_list, list)) {
+		INIT_CSD(&rq->csd, __blk_mq_complete_request_remote, rq);
+		smp_call_function_single_async(cpu, &rq->csd);
+	}
+}
Nit: it would be nice to initialize cpu and list in the declaration
lines.
Why? They get initialized later.
Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Sebastian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help