Skip to contentSkip to conversation

Can a kblockd work-item be preempted?

DISCUSSION Benjamin Block 1 participant 1 message Feb 24, 2021 Block layer

lore
Share & tools
lore
#0 lore raw

Hello,

it might be a silly question, but anyway. I was wondering if anyone could tell me whether a scheduled work-item on the kblockd workqueue can be preempted by the scheduler?

So when the worker is in the middle of dispatching requests in __blk_mq_sched_dispatch_requests(), can it be put to sleep by the scheduler, so that for example an other worker on the same workqueue can work on a hctx from a different request_queue on the same CPU?

I'd imagine so, if preemption is enabled for the kernel, but it's not obvious to me right now.

Thanks.

best regards,
- Benjamin