On Wed, 2018-01-31 at 09:53 +0800, Joseph Qi wrote: > At the first glance, I'm thinking of moving the blkcg_init_queue after > the queue_lock is overridden. But I don't have an idea yet to avoid the > risk during cleanup. > Since the initialization of request queue is so fundamental, I'm not > sure if there is the same risk in several other places. Hello Joseph, Moving the blkcg_init_queue() call from blk_alloc_queue_node() into blk_init_allocated_queue_node() would drop cgroup support from all block drivers that do not call blk_init_allocated_queue_node(). I think these drivers are brd, drbd, null_blk, pktcdvd, ps3vram, rsxx, umem, zram, lightnvm, bcache, dm in bio mode, md, nvdimm, the NVMe multipath driver, dcssblk and xpram. These drivers can be found by searching for blk_queue_make_request() calls in the kernel source code. I'm not sure we can drop cgroup support from all these block drivers. Bart.