From: Peter Zijlstra Subject: Re: [RFC] perf: fix building for ARCv1 Date: Mon, 19 Oct 2015 11:51:57 +0200 Message-ID: <20151019095157.GM3816@twins.programming.kicks-ass.net> References: <1445088959-3058-1-git-send-email-abrodkin@synopsys.com> <1445166916.9672.10.camel@synopsys.com> <87a8rf6a6p.fsf@tassilo.jf.intel.com> <8761235rwe.fsf@tassilo.jf.intel.com> <20151019093549.GK3816@twins.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from casper.infradead.org ([85.118.1.10]:51846 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753320AbbJSJwA (ORCPT ); Mon, 19 Oct 2015 05:52:00 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-perf-users-owner@vger.kernel.org List-ID: To: Vineet Gupta Cc: Andi Kleen , Alexey Brodkin , Aabid Rushdi , "linux-kernel@vger.kernel.org" , "linux-perf-users@vger.kernel.org" , "dvhart@linux.intel.com" , "dsahern@gmail.com" , "acme@redhat.com" On Mon, Oct 19, 2015 at 09:46:35AM +0000, Vineet Gupta wrote: > 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.