Re: [PATCH v2] memory tier: fix deadlock warning while onlining pages

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

 



> commit 823430c8e9d9 ("memory tier: consolidate the initialization of
> memory tiers") introduces a locking change that use guard(mutex) to
> instead of mutex_lock/unlock() for memory_tier_lock. It unexpectedly
> expanded the locked region to include the hotplug_memory_notifier(),
> as a result, it triggers an locking dependency detected of ABBA
> deadlock. Exclude hotplug_memory_notifier() from the locked region
> to fixing it.
> 
> The deadlock scenario is that when a memory online event occurs, the
> execution of memory notifier will access the read lock of the
> memory_chain.rwsem, then the reigistration of the memory notifier in
> memory_tier_init() acquires the write lock of the memory_chain.rwsem
> while holding memory_tier_lock. Then the memory online event continues
> to invoke the memory hotplug callback registered by memory_tier_init().
> Since this callback tries to acquire the memory_tier_lock, a deadlock
> occurs.
[sniped]

I encountered the same message, it works for me. Thanks.

Tested-by: Li Zhijian <lizhijian@xxxxxxxxxxx>





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux