android_kernel_samsung_a7y1.../drivers/acpi
Joerg Roedel 18a23eb805 x86/mm: split vmalloc_sync_all()
commit 763802b53a427ed3cbd419dbba255c414fdd9e7c upstream.

Commit 3f8fd02b1bf1 ("mm/vmalloc: Sync unmappings in
__purge_vmap_area_lazy()") introduced a call to vmalloc_sync_all() in
the vunmap() code-path.  While this change was necessary to maintain
correctness on x86-32-pae kernels, it also adds additional cycles for
architectures that don't need it.

Specifically on x86-64 with CONFIG_VMAP_STACK=y some people reported
severe performance regressions in micro-benchmarks because it now also
calls the x86-64 implementation of vmalloc_sync_all() on vunmap().  But
the vmalloc_sync_all() implementation on x86-64 is only needed for newly
created mappings.

To avoid the unnecessary work on x86-64 and to gain the performance
back, split up vmalloc_sync_all() into two functions:

	* vmalloc_sync_mappings(), and
	* vmalloc_sync_unmappings()

Most call-sites to vmalloc_sync_all() only care about new mappings being
synchronized.  The only exception is the new call-site added in the
above mentioned commit.

Shile Zhang directed us to a report of an 80% regression in reaim
throughput.

Fixes: 3f8fd02b1bf1 ("mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()")
Reported-by: kernel test robot <oliver.sang@intel.com>
Reported-by: Shile Zhang <shile.zhang@linux.alibaba.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Borislav Petkov <bp@suse.de>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>	[GHES]
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/20191009124418.8286-1-joro@8bytes.org
Link: https://lists.01.org/hyperkitty/list/lkp@lists.01.org/thread/4D3JPPHBNOSPFK2KEPC6KGKS6J25AIDB/
Link: http://lkml.kernel.org/r/20191113095530.228959-1-shile.zhang@linux.alibaba.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 14:14:34 +02:00
..
acpica ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1 2020-04-07 13:56:22 +02:00
apei x86/mm: split vmalloc_sync_all() 2020-04-07 14:14:34 +02:00
pmic A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ac.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_apd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_cmos_rtc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_extlog.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_ipmi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_lpat.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_lpss.c ACPI / LPSS: Ignore acpi_device_fix_up_power() return value 2020-04-07 12:41:18 +02:00
acpi_memhotplug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_pad.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_platform.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_pnp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_processor.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
acpi_video.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
battery.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
battery.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bgrt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blacklist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bus.c ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data() 2020-04-07 13:07:22 +02:00
button.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cm_sbs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
container.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cppc_acpi.c ACPI / CPPC: do not require the _PSD method 2020-04-07 07:38:54 +02:00
custom_method.c ACPI: custom_method: fix memory leaks 2020-04-07 07:38:59 +02:00
debugfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
device_pm.c ACPI: PM: Avoid attaching ACPI PM domain to certain devices 2020-04-07 13:07:24 +02:00
device_sysfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dock.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ec_sys.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ec.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
event.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fan.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
glue.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
gsi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hed.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
int340x_thermal.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
internal.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ioapic.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfit.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfit.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
numa.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nvs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
osl.c ACPI: OSL: only free map once in osl.c 2020-04-07 13:07:20 +02:00
pci_irq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pci_link.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pci_root.c PCI/ACPI: Correct error message for ASPM disabling 2020-04-07 12:28:27 +02:00
pci_slot.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
power.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
proc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
processor_core.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
processor_driver.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
processor_idle.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
processor_pdc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
processor_perflib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
processor_thermal.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
processor_throttling.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
property.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
reboot.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
resource.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sbs.c ACPI / SBS: Fix GPE storm on recent MacBookPro's 2020-04-06 15:20:26 +02:00
sbshc.c ACPI / SBS: Fix rare oops when removing modules 2020-04-07 12:32:57 +02:00
sbshc.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
scan.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sleep.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sleep.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sysfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tables.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
thermal.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
utils.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
video_detect.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wakeup.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30