Re: [PATCH RFC v4 1/3] block: add BIO_COMPLETE_IN_TASK for task-context completion

From: Bart Van Assche

Date: Wed Mar 25 2026 - 17:09:38 EST


On 3/25/26 11:43 AM, Tal Zussman wrote:
+ schedule_work_on(smp_processor_id(), &batch->work);

Since schedule_work_on() queues work on system_percpu_wq the above call
has the same effect as schedule_work(&batch->work), isn't it? From the
workqueue implementation:

system_percpu_wq = alloc_workqueue("events", WQ_PERCPU, 0);

[ ... ]

if (req_cpu == WORK_CPU_UNBOUND) {
if (wq->flags & WQ_UNBOUND)
cpu = wq_select_unbound_cpu(raw_smp_processor_id());
else
cpu = raw_smp_processor_id();

Thanks,

Bart.