[PATCH v5 7/7] xtensa: qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-03-27 Thread guoren
From: Guo Ren We don't have native hw xchg16 instruction, so let qspinlock generic code to deal with it. Using the full-word atomic xchg instructions implement xchg16 has the semantic risk for atomic operations. This patch cancels the dependency of on qspinlock generic code on architecture's xc

[PATCH v5 6/7] sparc: qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-03-27 Thread guoren
From: Guo Ren We don't have native hw xchg16 instruction, so let qspinlock generic code to deal with it. Using the full-word atomic xchg instructions implement xchg16 has the semantic risk for atomic operations. This patch cancels the dependency of on qspinlock generic code on architecture's xc

[PATCH v5 5/7] openrisc: qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-03-27 Thread guoren
From: Guo Ren We don't have native hw xchg16 instruction, so let qspinlock generic code to deal with it. Using the full-word atomic xchg instructions implement xchg16 has the semantic risk for atomic operations. This patch cancels the dependency of on qspinlock generic code on architecture's xc

[PATCH v5 4/7] powerpc/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-03-27 Thread guoren
From: Guo Ren We don't have native hw xchg16 instruction, so let qspinlock generic code to deal with it. Using the full-word atomic xchg instructions implement xchg16 has the semantic risk for atomic operations. This patch cancels the dependency of on qspinlock generic code on architecture's xc

[PATCH v5 3/7] csky: Convert custom spinlock/rwlock to generic qspinlock/qrwlock

2021-03-27 Thread guoren
From: Guo Ren Update the C-SKY port to use the generic qspinlock and qrwlock. C-SKY only support ldex.w/stex.w with word(double word) size & align access. So it must select XCHG32 to let qspinlock only use word atomic xchg_tail. Signed-off-by: Guo Ren Cc: Waiman Long Cc: Peter Zijlstra Cc: W

[PATCH v5 2/7] riscv: Convert custom spinlock/rwlock to generic qspinlock/qrwlock

2021-03-27 Thread guoren
From: Michael Clark Update the RISC-V port to use the generic qspinlock and qrwlock. This patch requires support for xchg_xtail for full-word which are added by a previous patch: Guo added select ARCH_USE_QUEUED_SPINLOCKS_XCHG32 in Kconfig Guo fixed up compile error which made by below include

[PATCH v5 1/7] locking/qspinlock: Add ARCH_USE_QUEUED_SPINLOCKS_XCHG32

2021-03-27 Thread guoren
From: Guo Ren Some architectures don't have sub-word swap atomic instruction, they only have the full word's one. The sub-word swap only improve the performance when: NR_CPUS < 16K * 0- 7: locked byte * 8: pending * 9-15: not used * 16-17: tail index * 18-31: tail cpu (+1) The 9-15 b

[PATCH v5 0/7] riscv: Add qspinlock/qrwlock

2021-03-27 Thread guoren
From: Guo Ren Current riscv is still using baby spinlock implementation. It'll cause fairness and cache line bouncing problems. Many people are involved and pay the efforts to improve it: - The first version of patch was made in 2019.1: https://lore.kernel.org/linux-riscv/20190211043829.300

Re: [PATCH] powerpc/vdso: Separate vvar vma from vdso

2021-03-27 Thread Dmitry Safonov
Hi Christophe, On 3/27/21 5:19 PM, Christophe Leroy wrote: [..] >> I opportunistically Cc stable on it: I understand that usually such >> stuff isn't a stable material, but that will allow us in CRIU have >> one workaround less that is needed just for one release (v5.11) on >> one platform (ppc64)

[PATCH] powerpc: Fix HAVE_HARDLOCKUP_DETECTOR_ARCH build configuration

2021-03-27 Thread Chen Huang
When compiling the powerpc with the SMP disabled, it shows the issue: arch/powerpc/kernel/watchdog.c: In function ‘watchdog_smp_panic’: arch/powerpc/kernel/watchdog.c:177:4: error: implicit declaration of function ‘smp_send_nmi_ipi’; did you mean ‘smp_send_stop’? [-Werror=implicit-function-decla

Re: [PATCH 2/4] exec: remove compat_do_execve

2021-03-27 Thread Sergei Shtylyov
On 3/26/21 5:38 PM, Christoph Hellwig wrote: > Just call compat_do_execve instead. compat_do_execveat(), maybe? > Signed-off-by: Christoph Hellwig > --- > fs/exec.c | 17 + > 1 file changed, 1 insertion(+), 16 deletions(-) > > diff --git a/fs/exec.c b/fs/exec.c > index b63f

Re: [PATCH v3 37/41] powerpc/32s: Move KUEP locking/unlocking in C

2021-03-27 Thread Christophe Leroy
Le 12/03/2021 à 13:50, Christophe Leroy a écrit : This can be done in C, do it. Unrolling the loop gains approx. 15% performance. From now on, prepare_transfer_to_handler() is only for interrupts from kernel. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/kup.h |

Re: [PATCH] powerpc/vdso: Separate vvar vma from vdso

2021-03-27 Thread Christophe Leroy
Le 26/03/2021 à 20:17, Dmitry Safonov a écrit : Since commit 511157ab641e ("powerpc/vdso: Move vdso datapage up front") VVAR page is in front of the VDSO area. In result it breaks CRIU (Checkpoint Restore In Userspace) [1], where CRIU expects that "[vdso]" from /proc/../maps points at ELF/vdso

Re: [PATCH V2 1/5] powerpc/perf: Expose processor pipeline stage cycles using PERF_SAMPLE_WEIGHT_STRUCT

2021-03-27 Thread Michael Ellerman
Arnaldo writes: > On March 25, 2021 11:38:01 AM GMT-03:00, Peter Zijlstra > wrote: >>On Thu, Mar 25, 2021 at 10:01:35AM -0300, Arnaldo Carvalho de Melo >>wrote:. >>> > > Also for CPU_FTR_ARCH_31, capture the two cycle counter >>information in >>> > > two 16 bit fields of perf_sample_weight struc