Skip to content
  • Glauber Costa's avatar
    slab: annotate on-slab caches nodelist locks · 6ccfb5bc
    Glauber Costa authored
    
    
    We currently provide lockdep annotation for kmalloc caches, and also
    caches that have SLAB_DEBUG_OBJECTS enabled.  The reason for this is that
    we can quite frequently nest in the l3->list_lock lock, which is not
    something trivial to avoid.
    
    My proposal with this patch, is to extend this to caches whose slab
    management object lives within the slab as well ("on_slab").  The need for
    this arose in the context of testing kmemcg-slab patches.  With such
    patchset, we can have per-memcg kmalloc caches.  So the same path that led
    to nesting between kmalloc caches will could then lead to in-memcg
    nesting.  Because they are not annotated, lockdep will trigger.
    
    Signed-off-by: default avatarGlauber Costa <glommer@parallels.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Frederic Weisbecker <fweisbec@redhat.com>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: JoonSoo Kim <js1304@gmail.com>
    Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Mel Gorman <mel@csn.ul.ie>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Pekka Enberg <penberg@cs.helsinki.fi>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Suleiman Souhlal <suleiman@google.com>
    Cc: Tejun Heo <tj@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    6ccfb5bc