[PATCH 03/26] mm/arc: Use general page fault accounting
Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Fix PERF_COUNT_SW_PAGE_FAULTS perf event manually for page fault retries, by moving it before taking mmap_sem. CC: Vineet Gupta CC: linux-snps-arc@lists.infradead.org Signed-off-by: Peter Xu --- arch/arc/mm/fault.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/arch/arc/mm/fault.c b/arch/arc/mm/fault.c index 34380139e7a2..68e6849cf086 100644 --- a/arch/arc/mm/fault.c +++ b/arch/arc/mm/fault.c @@ -106,6 +106,7 @@ void do_page_fault(unsigned long address, struct pt_regs *regs) if (write) flags |= FAULT_FLAG_WRITE; + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); retry: down_read(&mm->mmap_sem); @@ -131,7 +132,7 @@ void do_page_fault(unsigned long address, struct pt_regs *regs) goto bad_area; } - fault = handle_mm_fault(vma, address, flags, NULL); + fault = handle_mm_fault(vma, address, flags, regs); /* Quick path to respond to signals */ if (fault_signal_pending(fault, regs)) { @@ -156,22 +157,9 @@ void do_page_fault(unsigned long address, struct pt_regs *regs) * Major/minor page fault accounting * (in case of retry we only land here once) */ - perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); - - if (likely(!(fault & VM_FAULT_ERROR))) { - if (fault & VM_FAULT_MAJOR) { - tsk->maj_flt++; - perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, - regs, address); - } else { - tsk->min_flt++; - perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, - regs, address); - } - + if (likely(!(fault & VM_FAULT_ERROR))) /* Normal return path: fault Handled Gracefully */ return; - } if (!user_mode(regs)) goto no_context; -- 2.26.2 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] Remove STATFS_IS_STATFS64 conditional as it is zero in all ports
On 2/19/20 12:51 AM, Andreas Schwab wrote: > I think STATFS_IS_STATFS64 should actually be set to 1 on all 64-bit > architectures execpt alpha? So I experimented with making it 1 on a few 64-bit arches (s390x, powerpc64) but don't see any cogen changes compared to master for those 2 atleast. -->8--- diff --git a/sysdeps/unix/sysv/linux/generic/kernel_stat.h b/sysdeps/unix/sysv/linux/generic/kernel_stat.h index 2eed3596c0ed..0587e142cf6e 100644 --- a/sysdeps/unix/sysv/linux/generic/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/generic/kernel_stat.h @@ -23,8 +23,9 @@ /* We provide separate 32-bit API versions that check for EOVERFLOW. */ #if __WORDSIZE == 64 # define XSTAT_IS_XSTAT64 1 +#define STATFS_IS_STATFS64 1 #else # define XSTAT_IS_XSTAT64 0 +#define STATFS_IS_STATFS64 0 #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h index 5c10da3356f2..dd970ba69a7c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h @@ -18,4 +18,4 @@ #define STAT_IS_KERNEL_STAT 1 #define XSTAT_IS_XSTAT64 1 -#define STATFS_IS_STATFS64 0 +#define STATFS_IS_STATFS64 1 diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h b/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h index b38bf741d37b..ac580001f01b 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h @@ -18,4 +18,4 @@ #define STAT_IS_KERNEL_STAT 1 #define XSTAT_IS_XSTAT64 1 -#define STATFS_IS_STATFS64 0 +#define STATFS_IS_STATFS64 1 -->8--- And at any rate, no architecture for any ABI defines it to 1 today, it all seems dead code to me. Thx, -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH] Revert "FIX: no FPU exceptions bits on ARC glibc"
ARC glibc has supported fenv.h for quite some time, for either soft and hard so this workaround is no longer needed. This reverts commit 1125f1ee33324bc91b4e8dd9da49163af572d04a. --- numpy/core/src/npymath/ieee754.c.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/src/npymath/ieee754.c.src b/numpy/core/src/npymath/ieee754.c.src index 3f66b24a4c84..f3f15f84152b 100644 --- a/numpy/core/src/npymath/ieee754.c.src +++ b/numpy/core/src/npymath/ieee754.c.src @@ -682,7 +682,7 @@ void npy_set_floatstatus_invalid(void) } #elif defined(_MSC_VER) || (defined(__osf__) && defined(__alpha)) || \ - defined (__UCLIBC__) || (defined(__arc__) && defined(__GLIBC__)) + defined (__UCLIBC__) /* * By using a volatile floating point value, -- 2.20.1 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH] Revert "FIX: no FPU exceptions bits on ARC glibc"
From: Vineet Gupta ARC glibc has supported fenv.h for quite some time, for either soft and hard so this workaround is no longer needed. This reverts commit 1125f1ee33324bc91b4e8dd9da49163af572d04a. --- numpy/core/src/npymath/ieee754.c.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/src/npymath/ieee754.c.src b/numpy/core/src/npymath/ieee754.c.src index 3f66b24a4c84..f3f15f84152b 100644 --- a/numpy/core/src/npymath/ieee754.c.src +++ b/numpy/core/src/npymath/ieee754.c.src @@ -682,7 +682,7 @@ void npy_set_floatstatus_invalid(void) } #elif defined(_MSC_VER) || (defined(__osf__) && defined(__alpha)) || \ - defined (__UCLIBC__) || (defined(__arc__) && defined(__GLIBC__)) + defined (__UCLIBC__) /* * By using a volatile floating point value, -- 2.20.1 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH] Revert "FIX: no FPU exceptions bits on ARC glibc"
From: Vineet Gupta ARC glibc has supported fenv.h for quite some time, for either soft and hard so this workaround is no longer needed. This reverts commit 1125f1ee33324bc91b4e8dd9da49163af572d04a. --- numpy/core/src/npymath/ieee754.c.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/src/npymath/ieee754.c.src b/numpy/core/src/npymath/ieee754.c.src index 3f66b24a4c84..f3f15f84152b 100644 --- a/numpy/core/src/npymath/ieee754.c.src +++ b/numpy/core/src/npymath/ieee754.c.src @@ -682,7 +682,7 @@ void npy_set_floatstatus_invalid(void) } #elif defined(_MSC_VER) || (defined(__osf__) && defined(__alpha)) || \ - defined (__UCLIBC__) || (defined(__arc__) && defined(__GLIBC__)) + defined (__UCLIBC__) /* * By using a volatile floating point value, -- 2.20.1 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH] Revert "FIX: no FPU exceptions bits on ARC glibc"
ARC glibc has supported fenv.h for quite some time, for either soft and hard so this workaround is no longer needed. This reverts commit 1125f1ee33324bc91b4e8dd9da49163af572d04a. Signed-off-by: Vineet Gupta --- numpy/core/src/npymath/ieee754.c.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/src/npymath/ieee754.c.src b/numpy/core/src/npymath/ieee754.c.src index 3f66b24a4c84..f3f15f84152b 100644 --- a/numpy/core/src/npymath/ieee754.c.src +++ b/numpy/core/src/npymath/ieee754.c.src @@ -682,7 +682,7 @@ void npy_set_floatstatus_invalid(void) } #elif defined(_MSC_VER) || (defined(__osf__) && defined(__alpha)) || \ - defined (__UCLIBC__) || (defined(__arc__) && defined(__GLIBC__)) + defined (__UCLIBC__) /* * By using a volatile floating point value, -- 2.20.1 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: glibc 2.32 --- Two weeks to ABI freeze. Volunteers for release manager?
On 6/16/20 5:02 PM, Carlos O'Donell via Libc-alpha wrote: > The GNU C Library 2.32 release is scheduled for August 1st 2020. > > The ABI freeze should happen between July 1st 2020. > > We have 2 more weeks before ABI freeze. ARC port seems pretty close to production quality, with multiple rounds of reviews and updates already so it would be good to wrap it up too. All the accompanying generic changes have already been merged. Thx, -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc