> +     if (msecs == 0)
> +             kblockd_schedule_work_on(blk_mq_hctx_next_cpu(hctx),
> +                                      &hctx->run_work);
> +     else
> +             kblockd_schedule_delayed_work_on(blk_mq_hctx_next_cpu(hctx),
> +                                              &hctx->delayed_run_work,
> +                                              msecs_to_jiffies(msecs));
> +}

I'd rather make run_work a delayed_work (again) and use
kblockd_schedule_delayed_work_on with a timeout of zero for the immediate
run case instead of having two competing work structs.

Reply via email to