[PATCH] riscv: locks: introduce ticket-based spinlock implementation

Peter Zijlstra peterz at infradead.org
Wed Mar 24 12:23:41 GMT 2021


On Wed, Mar 24, 2021 at 12:15:47PM +0100, Vitaly Wool wrote:
> On Wed, Mar 24, 2021, 11:16 AM <guoren at kernel.org> wrote:
> 
> > From: Guo Ren <guoren at linux.alibaba.com>
> >
> > This patch introduces a ticket lock implementation for riscv, along the
> > same lines as the implementation for arch/arm & arch/csky.
> >
> 
> Could you please provide a rationale for this? Like, what is wrong with the
> current implementation.

test-and-set spinlocks have terrible worst case behaviour.



More information about the linux-riscv mailing list