Re: [PATCH v2 4/4] mm/slub: Fix sysfs shrink circular locking dependency

2020-05-16 Thread Qian Cai
> On Apr 27, 2020, at 7:56 PM, Waiman Long wrote: > > A lockdep splat is observed by echoing "1" to the shrink sysfs file > and then shutting down the system: > > [ 167.473392] Chain exists of: > [ 167.473392] kn->count#279 --> mem_hotplug_lock.rw_sem --> slab_mutex > [ 167.473392] > [

Re: [PATCH v2 4/4] mm/slub: Fix sysfs shrink circular locking dependency

2020-05-16 Thread Qian Cai
> On Apr 28, 2020, at 10:07 AM, Waiman Long wrote: > > Trylock is handled differently from lockdep's perspective as trylock can > failed. When trylock succeeds, the critical section is executed. As long as > it doesn't try to acquire another lock in the circular chain, the execution > will

Re: [PATCH v2 4/4] mm/slub: Fix sysfs shrink circular locking dependency

2020-04-28 Thread Qian Cai
> On Apr 28, 2020, at 10:06 AM, Waiman Long wrote: > > On 4/27/20 10:11 PM, Qian Cai wrote: >> >>> On Apr 27, 2020, at 9:39 PM, Waiman Long wrote: >>> >>> The sequence that was prevented by this patch is "kn->count --> >>> mem_hotplug_lock.rwsem". This sequence isn't directly in the

Re: [PATCH v2 4/4] mm/slub: Fix sysfs shrink circular locking dependency

2020-04-28 Thread Waiman Long
On 4/27/20 10:11 PM, Qian Cai wrote: On Apr 27, 2020, at 9:39 PM, Waiman Long wrote: The sequence that was prevented by this patch is "kn->count --> mem_hotplug_lock.rwsem". This sequence isn't directly in the splat. Once this link is broken, the 3-lock circular loop cannot be formed.