From: Nicholas Piggin <npiggin@gmail.com> Date: 2018-07-25 09:54:41
The kernel page table caches are tied to init_mm, so there is no
more need for them after userspace is finished.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/mm/mmu_context_book3s64.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
The kernel page table caches are tied to init_mm, so there is no
more need for them after userspace is finished.
The commit message could be improved with reference to active_mm.
something like?
destroy_context get called when we drop the last reference for mm which
could be much later than the task exit due to other lazy mm reference to
it. We could free the page table cache pages on task exit because they
only cache the userspace page table and kernel thread should not access
the user space address.
The mapping for kernel threads itself is maintained in init_mm and page
table cache for that is attached to init_mm
Reviewed-by: Aneesh Kumar K.V <redacted>
From: Michael Ellerman <hidden> Date: 2018-08-08 14:25:58
On Wed, 2018-07-25 at 09:54:28 UTC, Nicholas Piggin wrote:
The kernel page table caches are tied to init_mm, so there is no
more need for them after userspace is finished.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Aneesh Kumar K.V <redacted>