Re: [PATCH] blk-mq: move cpuhp callback registering out of q->sysfs_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 6, 2024 at 4:06 PM Ming Lei <ming.lei@xxxxxxxxxx> wrote:
>
> Registering and unregistering cpuhp requires global cpu hotplug lock,
> which is used everywhere. Meantime q->sysfs_lock is used in block layer
> almost everywhere.
>
> It is easy to trigger lockdep warning[1] by connecting the two locks.
>
> Fix the warning by moving blk-mq's cpuhp callback registering out of
> q->sysfs_lock. Add one dedicated global lock for covering registering &
> unregistering hctx's cpuhp, and it is safe to do so because hctx is
> guaranteed to be live if our request_queue is live.
>
> [1] https://lore.kernel.org/lkml/Z04pz3AlvI4o0Mr8@agluck-desk3/
>
> Cc: Reinette Chatre <reinette.chatre@xxxxxxxxx>
> Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx>
> Cc: Peter Newman <peternewman@xxxxxxxxxx>
> Cc: Babu Moger <babu.moger@xxxxxxx>
> Reported-by: Luck Tony <tony.luck@xxxxxxxxx>
> Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>

Please ignore this one which depends on another patch, and will
resend V2, and sorry for the noise.






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux