On Mon, May 11, 2020 at 01:56:49PM -0700, Bart Van Assche wrote: > On 2020-05-10 20:48, Ming Lei wrote: > > On Sun, May 10, 2020 at 08:20:24PM -0700, Bart Van Assche wrote: > >> What I meant is to freeze a request queue temporarily. > > > > But what is your motivation to freeze queue temporarily? > > To achieve a solution for CPU hotplugging that is much simpler than this > patch series, requires less code and hence is easier to test, debug and > maintain. Yeah, it can be done by queue freezing in the following way: 1) before one cpu is offline - if one hctx becomes inactive, then freeze the whole queue and wait for freezing done 2) after one cpu is offline - un-freeze the request queue if any hctx is inactive The whole disk becomes unusable during the period, which can be quite long, because freezing queue & wait for freezing done takes at least one RCU grace period even though there isn't any in-flight IO. And the above steps need to be run for every request queue in serialized way, so the whole time of suspending IO can be very long. That isn't reasonable. Thanks, Ming