summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2023-04-06 11:46:49 +0300
committerGuo Ren <guoren@linux.alibaba.com>2023-04-13 09:36:14 +0300
commit1f62ed00a56bf01becaccd81bf30f2fcb0322fd2 (patch)
tree07a1de94dab5df8fa540b11facf1b0ecd1b84866 /tools/perf/scripts/python/export-to-sqlite.py
parent74c53b5717ba762d8648ee9e3d961093df2d7300 (diff)
downloadlinux-1f62ed00a56bf01becaccd81bf30f2fcb0322fd2.tar.xz
csky: mmu: Prevent spurious page faults
C-SKY MMU would pre-fetch invalid pte entries, and it could work with flush_tlb_fix_spurious_fault, but the additional page fault exceptions would reduce performance. So flushing the entry of the TLB would prevent the following spurious page faults. Here is the test code: define DATA_LEN 4096 define COPY_NUM (504*100) unsigned char src[DATA_LEN*COPY_NUM] = {0}; unsigned char dst[DATA_LEN*COPY_NUM] = {0}; unsigned char func_src[DATA_LEN*COPY_NUM] = {0}; unsigned char func_dst[DATA_LEN*COPY_NUM] = {0}; void main(void) { int j; for (j = 0; j < COPY_NUM; j++) memcpy(&dst[j*DATA_LEN], &src[j*DATA_LEN], 4); } perf stat -e page-faults ./main.elf The amount of page fault traps would be reduced in half with the patch. Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions