Commit bb713c2a authored by Ze Zuo's avatar Ze Zuo
Browse files

arm64: mmap: disable align larger anonymous mappings on THP boundaries

hulk inclusion
category: performance
bugzilla: https://gitee.com/openeuler/kernel/issues/I9N68A


CVE: NA

--------------------------------

After committing df0ad057 ('mm: align larger anonymous mappings on THP
boundaries'), memory read latency increased significantly on arm64 but not
x86_64, so it's temporarily disabled on arm64 and we'll turn it back on
once it's fixed.

Signed-off-by: default avatarZe Zuo <zuoze1@huawei.com>
parent 1087e901
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1848,7 +1848,8 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
		 * so use shmem's get_unmapped_area in case it can be huge.
		 */
		get_area = shmem_get_unmapped_area;
	} else if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
	} else if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) &&
		   !IS_ENABLED(CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT)) {
		/* Ensures that larger anonymous mappings are THP aligned. */
		get_area = thp_get_unmapped_area;
	}