Re: [PATCH] slub: Fix sysfs circular locking dependency

From: David Rientjes
Date: Thu Jan 06 2011 - 15:47:26 EST


On Thu, 6 Jan 2011, Christoph Lameter wrote:

> slab_mem_going_online_callback() etc already take the slub_lock since they
> have to iterate over the list of slab caches in existence. We could take
> the hotplug lock there as well.
>
> Kame-san: Can you enlighten us on hotplug locking? And also check this
> patch?
>

Yeah, I was going to suggest doing the lock_memory_hotplug() before taking
slub_lock in the callback, but I really think it should be done in
online_pages(). Since the offline case is already handled, this would
expand the semantics of lock_memory_hotplug() to serialize the access of
data structures that can change in a memory hotplug notifier callback
without locking at the lower level.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/