Thread (13 messages) 13 messages, 4 authors, 2016-10-18

Re: [RFC] perf: fix building for ARCv1

From: Vineet Gupta <hidden>
Date: 2015-10-19 10:04:36
Also in: lkml

On Monday 19 October 2015 03:22 PM, Peter Zijlstra wrote:
On Mon, Oct 19, 2015 at 09:46:35AM +0000, Vineet Gupta wrote:
quoted
quoted
On ARC we could use the atomic EXchange to implement a user space only binary
semaphore - these atomic ops will be small duration so it is OK to spin wait for a
little bit. That's how the old pthread library worked for ARC w/o any atomic support.
That has the obvious problem of lock-holder-preemption and the horrible
performance issues that result from that.

I think the syscall at least has deterministic behaviour, whereas that
userspace spin loop has this abysmal worst case thing.
I agree - we can add that syscall trivially and use it based on build time feature
detection for atomics !
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help