On Wed, May 20, 2020 at 08:50:56PM -0700, Bart Van Assche wrote: > On 2020-05-20 19:57, Ming Lei wrote: > > On Wed, May 20, 2020 at 02:46:52PM -0700, Bart Van Assche wrote: > >> If the CPU to which one of these interrupt vectors has > >> been assigned is hotplugged, does that mean that four hardware queues > >> have to be quiesced instead of only one as is done in patch 6/6? > > > > No, one hctx only becomes inactive after each CPU in hctx->cpumask is offline. > > No matter how interrupt vector is assigned to hctx, requests shouldn't > > be dispatched to that hctx any more. > > Since I haven't found an answer to my question in your reply I will > rephrase my question. Suppose that there are 16 CPU cores, 16 hardware > queues and that hctx->cpumask of each hardware queue i only contains CPU > i. Suppose that four interrupt vectors (0, 1, 2 and 3) are used to > report the completions for these hardware queues. Suppose that interrupt > vector 3 is associated with hardware queues 12, 13, 14 and 15, and also > that interrupt vector 3 is mapped to CPU core 14. My interpretation of > patch 6/6 is that it will only quiesce hardware queue 14 but none of the > other hardware queues associated with the same interrupt vector > (hardware queues 12, 13 and 15). Isn't that a bug? No. If vector 3 is for covering hw queue 12 ~ 15, the vector shouldn't be shutdown when cpu 14 is offline. Also I am pretty sure that we don't do this way with managed IRQ. And non-managed IRQ will be migrated to other online cpus during cpu offline, so not an issue at all. See migrate_one_irq(). Thanks, Ming