Searched hist:"1 f62ed00" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/arch/csky/abiv2/ |
H A D | cacheflush.c | 1f62ed00 Thu Apr 06 03:46:49 CDT 2023 Guo Ren <guoren@linux.alibaba.com> 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>
|
/openbmc/linux/arch/csky/abiv1/ |
H A D | cacheflush.c | 1f62ed00 Thu Apr 06 03:46:49 CDT 2023 Guo Ren <guoren@linux.alibaba.com> 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>
|