Go to file
Nadav Amit aa44284960 x86/mm/tlb: Avoid reading mm_tlb_gen when possible
On extreme TLB shootdown storms, the mm's tlb_gen cacheline is highly
contended and reading it should (arguably) be avoided as much as
possible.

Currently, flush_tlb_func() reads the mm's tlb_gen unconditionally,
even when it is not necessary (e.g., the mm was already switched).
This is wasteful.

Moreover, one of the existing optimizations is to read mm's tlb_gen to
see if there are additional in-flight TLB invalidations and flush the
entire TLB in such a case. However, if the request's tlb_gen was already
flushed, the benefit of checking the mm's tlb_gen is likely to be offset
by the overhead of the check itself.

Running will-it-scale with tlb_flush1_threads show a considerable
benefit on 56-core Skylake (up to +24%):

threads		Baseline (v5.17+)	+Patch
1		159960			160202
5		310808			308378 (-0.7%)
10		479110			490728
15		526771			562528
20		534495			587316
25		547462			628296
30		579616			666313
35		594134			701814
40		612288			732967
45		617517			749727
50		637476			735497
55		614363			778913 (+24%)

Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Andy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/20220606180123.2485171-1-namit@vmware.com
2022-06-07 08:48:03 -07:00
Documentation Scheduler changes in this cycle were: 2022-05-24 11:11:13 -07:00
LICENSES LICENSES/LGPL-2.1: Add LGPL-2.1-or-later as valid identifiers 2021-12-16 14:33:10 +01:00
arch x86/mm/tlb: Avoid reading mm_tlb_gen when possible 2022-06-07 08:48:03 -07:00
block for-5.19/drivers-2022-05-22 2022-05-23 14:04:14 -07:00
certs Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
crypto for-5.18/64bit-pi-2022-03-25 2022-03-26 12:01:35 -07:00
drivers Perf events changes for this cycle were: 2022-05-24 10:59:38 -07:00
fs arm64 updates for 5.19: 2022-05-23 21:06:11 -07:00
include Scheduler changes in this cycle were: 2022-05-24 11:11:13 -07:00
init Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
ipc fs: allocate inode by using alloc_inode_sb() 2022-03-22 15:57:03 -07:00
kernel Scheduler changes in this cycle were: 2022-05-24 11:11:13 -07:00
lib Objtool changes for this cycle were: 2022-05-24 10:36:38 -07:00
mm arm64 updates for 5.19: 2022-05-23 21:06:11 -07:00
net for-5.19/io_uring-net-2022-05-22 2022-05-23 12:51:04 -07:00
samples sched/tracing: Append prev_state to tp args instead 2022-05-12 00:37:11 +02:00
scripts Objtool changes for this cycle were: 2022-05-24 10:36:38 -07:00
security selinux: fix bad cleanup on error in hashtab_duplicate() 2022-05-17 18:34:35 -04:00
sound xen: branch for v5.19-rc1 2022-05-23 20:49:45 -07:00
tools Perf events changes for this cycle were: 2022-05-24 10:59:38 -07:00
usr Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
virt KVM: Free new dirty bitmap if creating a new memslot fails 2022-05-20 13:02:05 -04:00
.clang-format genirq/msi: Make interrupt allocation less convoluted 2021-12-16 22:22:20 +01:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap Scheduler changes in this cycle were: 2022-05-24 11:11:13 -07:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: replace a Microchip AT91 maintainer 2022-02-09 11:30:01 +01:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS Scheduler changes in this cycle were: 2022-05-24 11:11:13 -07:00
Makefile Objtool changes for this cycle were: 2022-05-24 10:36:38 -07:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.