lkml.org 
[lkml]   [2021]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH/RFC v2 0/3] tlb: mmu_gather: use batched table free if possible
Date
In mmu_gather code, the final table free in __tlb_remove_table_free()
executes a loop, calling arch hook __tlb_remove_table() to free each table
individually.

Several architectures use free_page_and_swap_cache() as their
__tlb_remove_table() implementation. Calling that in loop results into
individual calls to put_page() for each page being freed.

This patchset refactors the code to issue a single release_pages() call
in this case. This is expected to have better performance, especially when
memcg accounting is enabled.

Nikita Yushchenko (3):
tlb: mmu_gather: introduce CONFIG_MMU_GATHER_TABLE_FREE_COMMON
mm/swap: introduce free_pages_and_swap_cache_nolru()
tlb: mmu_gather: use batched table free if possible

arch/Kconfig | 3 +++
arch/arm/Kconfig | 1 +
arch/arm/include/asm/tlb.h | 5 -----
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/tlb.h | 5 -----
arch/x86/Kconfig | 1 +
arch/x86/include/asm/tlb.h | 14 --------------
include/asm-generic/tlb.h | 5 +++++
include/linux/swap.h | 5 ++++-
mm/mmu_gather.c | 25 ++++++++++++++++++++++---
mm/swap_state.c | 29 ++++++++++++++++++++++-------
11 files changed, 59 insertions(+), 35 deletions(-)

--
2.30.2

\
 
 \ /
  Last update: 2021-12-18 19:54    [W:0.044 / U:1.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site