Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp275343ybv; Thu, 13 Feb 2020 00:01:12 -0800 (PST) X-Google-Smtp-Source: APXvYqxVSzPD+1Zpv0qv369c424oKAL/APuEfbnABoDct/KguCwoG8wmihllWZ80TibnugI0WmxO X-Received: by 2002:aca:f20b:: with SMTP id q11mr2000158oih.78.1581580872051; Thu, 13 Feb 2020 00:01:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581580872; cv=none; d=google.com; s=arc-20160816; b=ODNWiow+jZA2BQs5rhscbBfSoZvyMy8rR9BDoWeSWxtWCuzkBTI9gqAW1r48+w1OGe UKUazzjTRp3zYC8xIOt/cJQHZOo2PdCoArjduDwxs4oXWt9n50bAG2/r6f+3+FxOCPtZ AXNnH/SVNEtN6IdgTAm5LCoO+3wu89D5kNjEETutdqhN9zweiNi5aTC2KcWNU0f3XkWS mdO7olkMOcsi6YkEaB+5+YRIKqK2If1ydUBSUqqb26l4B2jBkZcsWfZ4pu8U649isZNz VXUKJ1K6ha44Nr2A1S+Dxwz0wjUIhgLlbk4KbzFra2YhrEPBUJdLtuHDAVw8m5XYBrTU eGVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oVk3qHIezoee3VNj7y2gOdnxt1SZIrS+8EECMrNmYPY=; b=XIGwPo8lW7/vFPfeXz1d8cfs7G9p5BqTXTcj6wyw5uJiOgdbo/nTvsOMjmuqi5xPfH B/s5NJVwp5xLamLWwMDGaSX7vXq4oR5j9j8aLLYYtRVGgtwbUcFn/XpYS1WLlqW8Mb97 Y0x6pblEoXtiLRd4ej/JA3i0Cbxd0q6Ml8A4SXPkagNLXDcv9yJv0gBYKJviV0tnTnnh Yg01raIueaZ/qD7FzT/T7EvmiSr8ZZsEV/lAX2ruJDtFdqEiXwwmaSXmJWwyda/4AsWC roc5Bpq6vukwUGdNX/EJ7zivkGfYZnDYqBXYu2TKLMyO3X7M1gv+Bink+v8mhjhZ3HhB /3Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jvGbZmNt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69si754821otv.190.2020.02.13.00.00.58; Thu, 13 Feb 2020 00:01:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jvGbZmNt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729459AbgBMIAu (ORCPT + 99 others); Thu, 13 Feb 2020 03:00:50 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36238 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbgBMIAt (ORCPT ); Thu, 13 Feb 2020 03:00:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=oVk3qHIezoee3VNj7y2gOdnxt1SZIrS+8EECMrNmYPY=; b=jvGbZmNt3AWUyT5h3RwO+SHXBI H762LlG2hl6zpPpe2VU4Yxb8kOpKouAxHkZ1LzUvbcM2iit0928vYbPcqnasbAm2mO0nGS/wYGcL5 De6qnTWtsoX+NS2Tl2dB6mCuorFFCOPkiF2ANaWEslm4vg2nmXtNZlm0GI6vJsQxd/zrRAm+tMsg3 +bVRkiNQ1rO+iXtXuNdl+9pWS5TpM/U0Omdbu5CWF2wiiOfyOrt+RmJWd3JShO/3/+UFo9eoHz+aP oUxiRdnz80MpBBRTVRPNR1DvUBnpdQ6e97aHQjugaAsBIk3CbRniZoXC7kM0p0FlHCttrbs6SJmZb HVRp2xoA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j29QV-0002VU-5b; Thu, 13 Feb 2020 08:00:47 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7BABE30066E; Thu, 13 Feb 2020 08:58:54 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0141520206D65; Thu, 13 Feb 2020 09:00:43 +0100 (CET) Date: Thu, 13 Feb 2020 09:00:43 +0100 From: Peter Zijlstra To: Michal Simek Cc: linux-kernel@vger.kernel.org, monstr@monstr.eu, git@xilinx.com, arnd@arndb.de, Stefan Asserhall , Ingo Molnar , Will Deacon Subject: Re: [PATCH 6/7] microblaze: Implement architecture spinlock Message-ID: <20200213080043.GF14897@hirez.programming.kicks-ass.net> References: <20200212154756.GY14897@hirez.programming.kicks-ass.net> <5315513c-2492-6bb7-2961-b249851b2051@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5315513c-2492-6bb7-2961-b249851b2051@xilinx.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 13, 2020 at 08:51:38AM +0100, Michal Simek wrote: > On 12. 02. 20 16:47, Peter Zijlstra wrote: > > > > That's a test-and-set spinlock if I read it correctly. Why? that's the > > worst possible spinlock implementation possible. > > This was written by Stefan and it is aligned with recommended > implementation. What other options do we have? A ticket lock should be simple enough; ARM has one you can borrow from. The problem with TaS spinlocks is that they're unfair and exhibit horrible starvation issues.