Received: by 10.213.65.68 with SMTP id h4csp1055071imn; Sat, 7 Apr 2018 16:43:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx49NZnVlHwEjZ0d+N28RIXUwzhHGGgU7Zp5L3sjaT5C9UwXtXKhoGfJt0Pe4lvG577QYVaG7 X-Received: by 10.99.119.195 with SMTP id s186mr21714500pgc.453.1523144609562; Sat, 07 Apr 2018 16:43:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523144609; cv=none; d=google.com; s=arc-20160816; b=BjwDINhPeweykV75GTJOvaIeBHloIdNVI6Ajj1nKGRQ2qHCKxfT+NHYDECVrJ8wiNL 2hqsP0lOaTPmbM5BiJiWMZGIckjKmTsP09af12ccHAhc390vgllrlhsQ1Qu/dfIRYGQH g6qBg2nV69GLkCXg2m4f7Y0XWTdte3fwukUTu72iINHOLQQw4oJrr54ZB0OtsBkQAXyS oKv5hLVCzfMLZWVjYH23jEckka8hizkT3+Kif7/ZhtS9Cy8iRjaSvPmk/IGJO87NTJuu Pv5+SM0GcuU/ePV6m0P7oaN9PBzSxbPNQMYOsfa3oh3WcV1opCVJxhn5z7spDA5gS0CI Q4uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=46CCtZzKq0lTg9EI0JvcyPM3JlrFCCcPbAZ78Wmxe/0=; b=PFKICayPZjja7bbYGa9csk7NkLQUQXJfndUmZ/f3IEgIzKwzeAAWBjSXjKgDU7zSMk pDqh4KDq1T2mLlAK9RKfTOvyNHDxGuiXNsJkERgfJ18wjnNJzTKaMzg2FmcUlruX2f0J FTCXmkm395+D3y6PV1XujAeElnFGyGHl2G1VAbySSLSS4E6dg9vRuu+lPCmgh0OqNGjv V1CJxjboEGQkCFEWOc/X5u4HulpqTcXxX+syQbgVtMqQzQF0tPGivttmqggPenuOjcb1 1h8UCeoucBxC7jUV/lEvPczNNjWNu4f7xPAOmvCxgogIVeDnIfp2pnT9joNhpnAWaUPm 6MGg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c66si2701034pfb.278.2018.04.07.16.42.17; Sat, 07 Apr 2018 16:43:29 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752391AbeDGXgt (ORCPT + 99 others); Sat, 7 Apr 2018 19:36:49 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41886 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752283AbeDGXgs (ORCPT ); Sat, 7 Apr 2018 19:36:48 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w37NYRVL028619 for ; Sat, 7 Apr 2018 19:36:47 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2h6u0sm0mt-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Sat, 07 Apr 2018 19:36:46 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 7 Apr 2018 19:36:45 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sat, 7 Apr 2018 19:36:41 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w37NaeUv41811994; Sat, 7 Apr 2018 23:36:40 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5E1F8B2046; Sat, 7 Apr 2018 20:38:47 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.80.213.214]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 237A6B204E; Sat, 7 Apr 2018 20:38:47 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 0675016C1B3E; Sat, 7 Apr 2018 16:37:42 -0700 (PDT) Date: Sat, 7 Apr 2018 16:37:42 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Waiman Long , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mingo@kernel.org, boqun.feng@gmail.com, catalin.marinas@arm.com Subject: Re: [PATCH 02/10] locking/qspinlock: Remove unbounded cmpxchg loop from locking slowpath Reply-To: paulmck@linux.vnet.ibm.com References: <1522947547-24081-1-git-send-email-will.deacon@arm.com> <1522947547-24081-3-git-send-email-will.deacon@arm.com> <20180406210953.GA24165@linux.vnet.ibm.com> <20180407084732.GO4082@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180407084732.GO4082@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18040723-0052-0000-0000-000002D6B15B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008815; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000256; SDB=6.01014635; UDB=6.00517290; IPR=6.00793891; MB=3.00020464; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-07 23:36:43 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18040723-0053-0000-0000-00005C405FF8 Message-Id: <20180407233741.GM3948@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-07_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804070250 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 07, 2018 at 10:47:32AM +0200, Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 02:09:53PM -0700, Paul E. McKenney wrote: > > It would indeed be good to not be in the position of having to trade off > > forward-progress guarantees against performance, but that does appear to > > be where we are at the moment. > > Depends of course on how unfair cmpxchg is. On x86 we trade one cmpxchg > loop for another so the patch doesn't cure anything at all there. And > our cmpxchg has 'some' hardware fairness to it. > > So while the patch is 'good' for platforms that have native fetch-or, > it doesn't help (or in our case even hurts) those that do not. Might need different implementations for different architectures, then. Or take advantage of the fact that x86 can do a native fetch-or to the topmost bit, if that helps. Thanx, Paul