[PATCH v3] mm/hugetlb: avoid looping to the same hugepage if !pages and !vmas

2019-09-04 Thread Zhigang Lu
From: Zhigang Lu When mmapping an existing hugetlbfs file with MAP_POPULATE, we find it is very time consuming. For example, mmapping a 128GB file takes about 50 milliseconds. Sampling with perfevent shows it spends 99% time in the same_page loop in follow_hugetlb_page(). samples: 205 of event

[PATCH v2] mm/hugetlb: avoid looping to the same hugepage if !pages and !vmas

2019-08-29 Thread Zhigang Lu
From: Zhigang Lu When mmapping an existing hugetlbfs file with MAP_POPULATE, we find it is very time consuming. For example, mmapping a 128GB file takes about 50 milliseconds. Sampling with perfevent shows it spends 99% time in the same_page loop in follow_hugetlb_page(). samples: 205 of event

[PATCH] mm/hugetlb: avoid looping to the same hugepage if !pages and !vmas

2019-08-29 Thread zhigang lu
From: Zhigang Lu This change greatly decrease the time of mmaping a file in hugetlbfs. With MAP_POPULATE flag, it takes about 50 milliseconds to mmap a existing 128GB file in hugetlbfs. With this change, it takes less then 1 millisecond. Signed-off-by: Zhigang Lu Reviewed-by: Haozhong Zhang

[PATCH 2/2] tile/jump_label: add jump label support for TILE-Gx

2015-09-29 Thread Zhigang Lu
Add the arch-specific code to support jump label for TILE-Gx. This code shares NOP instruction with ftrace, so we move it to a common header file. Reviewed-by: Chris Metcalf Signed-off-by: Zhigang Lu --- arch/tile/Kconfig | 1 + arch/tile/include/asm/insn.h | 59

[PATCH 0/2] add jump label support for TILE-Gx

2015-09-29 Thread Zhigang Lu
This patch set adds jump_label support for TILE-Gx architecture. As jump_label shares some code with ftrace, kgdb and kprobes, we factor this out into a helper routine as a prequel patch. Zhigang Lu (2): tile: define a macro ktext_writable_addr to get writable kernel text address tile

[PATCH 1/2] tile: define a macro ktext_writable_addr to get writable kernel text address

2015-09-29 Thread Zhigang Lu
It is used by kgdb, ftrace, kprobe and jump label, so we factor this out into a helper routine. Reviewed-by: Chris Metcalf Signed-off-by: Zhigang Lu --- arch/tile/include/asm/page.h | 10 ++ arch/tile/kernel/ftrace.c| 2 +- arch/tile/kernel/kgdb.c | 2 +- arch/tile/kernel

[PATCH 0/2] add jump label support for TILE-Gx

2015-09-29 Thread Zhigang Lu
This patch set adds jump_label support for TILE-Gx architecture. As jump_label shares some code with ftrace, kgdb and kprobes, we factor this out into a helper routine as a prequel patch. Zhigang Lu (2): tile: define a macro ktext_writable_addr to get writable kernel text address tile

[PATCH 2/2] tile/jump_label: add jump label support for TILE-Gx

2015-09-29 Thread Zhigang Lu
Add the arch-specific code to support jump label for TILE-Gx. This code shares NOP instruction with ftrace, so we move it to a common header file. Reviewed-by: Chris Metcalf <cmetc...@ezchip.com> Signed-off-by: Zhigang Lu <z...@ezchip.com> --- arch/tile/Kconfig | 1

[PATCH 1/2] tile: define a macro ktext_writable_addr to get writable kernel text address

2015-09-29 Thread Zhigang Lu
It is used by kgdb, ftrace, kprobe and jump label, so we factor this out into a helper routine. Reviewed-by: Chris Metcalf <cmetc...@ezchip.com> Signed-off-by: Zhigang Lu <z...@ezchip.com> --- arch/tile/include/asm/page.h | 10 ++ arch/tile/kernel/ftrace.c| 2 +- arch