]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lazy tlb: allow lazy tlb mm refcounting to be configurable
authorNicholas Piggin <npiggin@gmail.com>
Mon, 23 Aug 2021 23:59:18 +0000 (09:59 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Aug 2021 23:33:55 +0000 (09:33 +1000)
commitccb3587b3ce93b2b959dbace94200d02ae260a5e
treee3f5701184810fce77463d2daeaed4ce26b1e4eb
parentbfb4fd128488fb453844f6802259876ad9595d89
lazy tlb: allow lazy tlb mm refcounting to be configurable

Add CONFIG_MMU_TLB_REFCOUNT which enables refcounting of the lazy tlb mm
when it is context switched.  This can be disabled by architectures that
don't require this refcounting if they clean up lazy tlb mms when the last
refcount is dropped.  Currently this is always enabled, which is what
existing code does, so the patch is effectively a no-op.

Rename rq->prev_mm to rq->prev_lazy_mm, because that's what it is.

Link: https://lkml.kernel.org/r/20210605014216.446867-3-npiggin@gmail.com
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Anton Blanchard <anton@ozlabs.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@ozlabs.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
arch/Kconfig
include/linux/sched/mm.h
kernel/sched/core.c
kernel/sched/sched.h