Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7216736ybi; Wed, 5 Jun 2019 13:19:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFWc9TegC+EyyO8w0ANqvF3lh/Omakc2BzO7GALXUzzYBmzfGODXx42+G7a1p0NHAChlU4 X-Received: by 2002:aa7:93bb:: with SMTP id x27mr48750167pff.104.1559765981836; Wed, 05 Jun 2019 13:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559765981; cv=none; d=google.com; s=arc-20160816; b=XhuVaXA3ukAD63wZgLnu47vxkNNc9qhI4fsupJDLvszlzSh+Q3DUunOqRULYRe9Kp0 oaiI3zp0EiiT7eCP52f2Lp/xcjeoM6zOW3t1PN+Sq/wX9NHiPGvJcAqd6y0e1hZNazl9 0Vy0GFrhDWXZrDmQOtQ8KaUxcOboD8EkmsEXgjoSxiqK+zv1zl/mwq3xG6HL0Ne05i+2 5hFyBAs7DGOMd+6AR367ugY60H0AKQ2taqrD3GUQv0F414FcNpSx+C3yfToRnPtNiOg+ /utJq6/UWHUruolwVw18ioXy/yUFBYZizORRnZGWf0bGrXeGLyk3tkRCb+TEuRTTkMBO LAfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=lAgnsEnKeCxY9u014rJT1VaHWqSctLHeKnZqo2hzSG8=; b=Tj864CFcnT3GZhLc9PVeBGLjPufUozumZPQz8yEJ0Rwhpif5x2tcYESG2hiUd7WbRt 9qImvs0uWpo3qng6nNu02saYl3t9hsnYw7XbD5TeNjljosuBKl/s6mpzBn71gDgSMViN vU5CKx0KdWddR3Oe743JM8n0QW3HIbB5lfnov/hB4TBf60ovERMleDPJCLDaVYkPQsXi g6/dLRVM95RUm4GzGpLaFz0hGkeLgobTuos+7+fPhaGONdykAFdS0da6lUWBrxPvS4sB riELwhLER+1uCBR7WfXwJdrwKGK3HmzT3Xfi8FLgF09ZZqcUtatGc3uaS31utkSVkwtf bx/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RG30N6ao; 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 f96si2018285plb.339.2019.06.05.13.19.24; Wed, 05 Jun 2019 13:19:41 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RG30N6ao; 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 S1726637AbfFEURG (ORCPT + 99 others); Wed, 5 Jun 2019 16:17:06 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:34731 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726477AbfFEURG (ORCPT ); Wed, 5 Jun 2019 16:17:06 -0400 Received: by mail-lf1-f67.google.com with SMTP id y198so9575789lfa.1 for ; Wed, 05 Jun 2019 13:17:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lAgnsEnKeCxY9u014rJT1VaHWqSctLHeKnZqo2hzSG8=; b=RG30N6aoY395YurZq4ybtnNRM9wlIxtGe/8kU8b/tgTboXtztfw9Hjjspt4Rs+ny5z YMl1H3wa17kRy73GosnYqgk2HhP2PBpl7z1UpnWxC3rTqCyB8vRcNnwk7iLCE5J5vKTx XmjM1HtA2Ml6mzEsGoV+kvNly1eZynxjS6LBM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lAgnsEnKeCxY9u014rJT1VaHWqSctLHeKnZqo2hzSG8=; b=hlS8gfL0NyELVXIyz7YmXtqQI7K3LskccmwMJ3lFWddWhHkyXYHELYNKCbZ82VJGrP ANt21GHfmy12AD36jpX4vVGzWOv9fxzxT6DUYMKB7GFFJVbTteATlD8aPZZ6wELvNb43 B9Ti7Djw2hAX5EVobuzhOaeyemK0f3sWDnFIQN/ghdgEXGFOm9uw1hIpy8NmoxMp0ZWT YUhnyCuK0gMfk9VkrfAJXPfxS8iAnknJHAxYxALgwAtJNvAcuFKW9fw+34ZP1LXa+3Ge ZH2QFTZerNgCr4XFcdqse9wDnEZPXZfZCas2+BFbZCz1kT49toHn6by2s/Egr+nD3y+I H7lQ== X-Gm-Message-State: APjAAAXGJO1E5T9/wetlREs7T5ASxmNt5Llo0hdptmeHHfh0YZXjCpGz rm2kNjffGDzqZUrckaeAgFI7yp1s8qg= X-Received: by 2002:a19:6a07:: with SMTP id u7mr18091562lfu.74.1559765824548; Wed, 05 Jun 2019 13:17:04 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id 80sm4383770lfz.56.2019.06.05.13.17.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 13:17:03 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id a9so18656672lff.7 for ; Wed, 05 Jun 2019 13:17:02 -0700 (PDT) X-Received: by 2002:a19:ae01:: with SMTP id f1mr20922609lfc.29.1559765822588; Wed, 05 Jun 2019 13:17:02 -0700 (PDT) MIME-Version: 1.0 References: <20190605134849.28108-1-jglauber@marvell.com> In-Reply-To: <20190605134849.28108-1-jglauber@marvell.com> From: Linus Torvalds Date: Wed, 5 Jun 2019 13:16:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] lockref: Limit number of cmpxchg loop retries To: Jan Glauber Cc: Linux List Kernel Mailing , Catalin Marinas , Will Deacon , Linux ARM , Jayachandran Chandrasekharan Nair , Jan Glauber Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 5, 2019 at 6:49 AM Jan Glauber wrote: > > Add an upper bound to the loop to force the fallback to spinlocks > after some time. A retry value of 100 should not impact any hardware > that does not have this issue. > > With the retry limit the performance of an open-close testcase > improved between 60-70% on ThunderX2. Btw, did you do any kind of performance analysis across different retry limit values? I'm perfectly happy to just pick a random number and '100' looks fine to me, so this is mainly out of curiosity. Linus