On Mon, 2017-09-11 at 10:20 -0700, Tejun Heo wrote: > Hmm... so if you know that you won't try to switch again while > switching is in progress, it should be fine. That can't be > guaranteed? Hello Tejun, After having had another look at the power management documentation I see now that power management callbacks are only called from atomic context if pm_runtime_irq_safe(dev) is called first. Neither the block layer core nor the SCSI core call this function so I will try to rework this patch series without modifying the percpu-refcount implementation. Thanks, Bart.