[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211218185205.1744125-1-nikita.yushchenko@virtuozzo.com>
Date: Sat, 18 Dec 2021 21:52:03 +0300
From: Nikita Yushchenko <nikita.yushchenko@...tuozzo.com>
To: Will Deacon <will@...nel.org>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Nick Piggin <npiggin@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Catalin Marinas <catalin.marinas@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Arnd Bergmann <arnd@...db.de>, Sam Ravnborg <sam@...nborg.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-mm@...ck.org, kernel@...nvz.org
Subject: [PATCH/RFC v2 0/3] tlb: mmu_gather: use batched table free if possible
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
Powered by blists - more mailing lists