]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - mm/slub.c
mm, slab: split out the cpu offline variant of flush_slab()
authorVlastimil Babka <vbabka@suse.cz>
Thu, 3 Jun 2021 17:17:42 +0000 (19:17 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Fri, 3 Sep 2021 23:12:22 +0000 (01:12 +0200)
commit08beb547a1f7b66fbeaf40f2d3675a3ea0060c0b
treeb79a96ce0825019fd92c97f63c0915d879634a95
parent0e7ac738f785e695acfa1203a87f6a505305542a
mm, slab: split out the cpu offline variant of flush_slab()

flush_slab() is called either as part IPI handler on given live cpu, or as a
cleanup on behalf of another cpu that went offline. The first case needs to
protect updating the kmem_cache_cpu fields with disabled irqs. Currently the
whole call happens with irqs disabled by the IPI handler, but the following
patch will change from IPI to workqueue, and flush_slab() will have to disable
irqs (to be replaced with a local lock later) in the critical part.

To prepare for this change, replace the call to flush_slab() for the dead cpu
handling with an opencoded variant that will not disable irqs nor take a local
lock.

Suggested-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slub.c