OpenCloudOS-Kernel/arch
Oscar Salvador faf1c0008a x86/vmemmap: optimize for consecutive sections in partial populated PMDs
We can optimize in the case we are adding consecutive sections, so no
memset(PAGE_UNUSED) is needed.

In that case, let us keep track where the unused range of the previous
memory range begins, so we can compare it with start of the range to be
added.  If they are equal, we know sections are added consecutively.

For that purpose, let us introduce 'unused_pmd_start', which always holds
the beginning of the unused memory range.

In the case a section does not contiguously follow the previous one, we
know we can memset [unused_pmd_start, PMD_BOUNDARY) with PAGE_UNUSE.

This patch is based on a similar patch by David Hildenbrand:

https://lore.kernel.org/linux-mm/20200722094558.9828-10-david@redhat.com/

Link: https://lkml.kernel.org/r/20210309214050.4674-5-osalvador@suse.de
Signed-off-by: Oscar Salvador <osalvador@suse.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-04-30 11:20:38 -07:00
..
alpha Kbuild updates for v5.13 2021-04-29 14:24:39 -07:00
arc ARC: treewide: avoid the pointer addition with NULL pointer 2021-03-22 10:05:43 -07:00
arm mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
arm64 mm/memtest: add ARCH_USE_MEMTEST 2021-04-30 11:20:36 -07:00
csky mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
h8300 arch: setup PF_IO_WORKER threads like PF_KTHREAD 2021-02-21 17:25:22 -07:00
hexagon io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
ia64 ia64: module: fix symbolizer crash on fdescr 2021-04-30 11:20:35 -07:00
m68k \n 2021-04-29 10:51:29 -07:00
microblaze Microblaze patches for 5.13-rc1 2021-04-29 11:36:47 -07:00
mips mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
nds32 nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff 2021-04-09 14:54:23 -07:00
nios2 mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
openrisc io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
parisc \n 2021-04-29 10:51:29 -07:00
powerpc mm/memtest: add ARCH_USE_MEMTEST 2021-04-30 11:20:36 -07:00
riscv riscv: keep interrupts disabled for BREAKPOINT exception 2021-04-15 21:32:40 -07:00
s390 Networking changes for 5.13. 2021-04-29 11:57:23 -07:00
sh mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
sparc mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
um printk changes for 5.13 2021-04-27 18:09:44 -07:00
x86 x86/vmemmap: optimize for consecutive sections in partial populated PMDs 2021-04-30 11:20:38 -07:00
xtensa mm/memtest: add ARCH_USE_MEMTEST 2021-04-30 11:20:36 -07:00
.gitignore
Kconfig Kbuild updates for v5.13 2021-04-29 14:24:39 -07:00