Skip to content
  • Vlastimil Babka's avatar
    mm, slub: call deactivate_slab() without disabling irqs · dd4ab9d0
    Vlastimil Babka authored
    
    
    The function is now safe to be called with irqs enabled, so move the calls
    outside of irq disabled sections.
    
    When called from ___slab_alloc() -> flush_slab() we have irqs disabled, so to
    reenable them before deactivate_slab() we need to open-code flush_slab() in
    ___slab_alloc() and reenable irqs after modifying the kmem_cache_cpu fields.
    But that means a IRQ handler meanwhile might have assigned a new page to
    kmem_cache_cpu.page so we have to retry the whole check.
    
    The remaining callers of flush_slab() are the IPI handler which has disabled
    irqs anyway, and slub_cpu_dead() which will be dealt with in the following
    patch.
    
    Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    dd4ab9d0