Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753984AbbHCOkT (ORCPT ); Mon, 3 Aug 2015 10:40:19 -0400 Received: from smtprelay.synopsys.com ([198.182.60.111]:60143 "EHLO smtprelay.synopsys.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753952AbbHCOkR convert rfc822-to-8bit (ORCPT ); Mon, 3 Aug 2015 10:40:17 -0400 From: Vineet Gupta To: Peter Zijlstra CC: lkml , "arc-linux-dev@synopsys.com" Subject: Re: [PATCH 6/6] ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle Thread-Topic: [PATCH 6/6] ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle Thread-Index: AQHQzeGyubyM/l1m1EurCJfhiWtKyA== Date: Mon, 3 Aug 2015 14:40:13 +0000 Message-ID: References: <1438596188-10875-1-git-send-email-vgupta@synopsys.com> <1438596188-10875-7-git-send-email-vgupta@synopsys.com> <20150803114352.GL25159@twins.programming.kicks-ass.net> Accept-Language: en-US, en-IN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.197.191] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1035 Lines: 20 On Monday 03 August 2015 05:14 PM, Peter Zijlstra wrote: > On Mon, Aug 03, 2015 at 03:33:08PM +0530, Vineet Gupta wrote: >> > A spin lock could be available momentarily, but the SCOND to actually >> > acquire it might still fail due to concurrent update from other core(s). >> > To elide hardware lock, the sequence is retried after a "delay" which is >> > increased expoenntially to get a nice backoff behaviour. >> > >> > However, this could cause the delay counter to get to a high value. Thus >> > when the next spin cycle restarts, reset the counter back to starting >> > value of 1. > Cute.. fwiw, did you look at what Sparc64 does? > Can't really comprehend what's special there - are you referring to the special branching or to the out of line slow path code for 32 bit version. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/