>>> It might make sense to lock it separately, but I would not worry >>> about it unless it shows up as hot in your testing. >> Actually, we've met a triggering of nmi_watchdog, blocked at the queue lock >> in blkcg_print_blkgs(), caused by the slow serial console and too many printks. >> Related discussion is here, >> https://bugzilla.kernel.org/show_bug.cgi?id=199003 >> Even though it's not caused by the queue lock directly, it would not happen >> without using queue lock. The queue lock is big and used too widely, using it >> would intensify the race, so we're trying to understand the locks using in blkg, >> and maybe could improve the situation. > > The queue lock is only used widely on non blk-mq, where it is the only > lock really. Doing serial IO under a spinlock is always going to suck, > regardless of how contended it is. It's not a problem of queue lock indeed, just want to dig deeper. :) Thanks for the reply. Jiang, Regards