Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp919743imm; Fri, 12 Oct 2018 08:46:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV62kMlGVx0NBlTTMX/XVn3M8rIvmIiD2e+G7rRuc2JJ5mbh1SAv5lLPoJi2liARLq4Ao+9jw X-Received: by 2002:a63:e54d:: with SMTP id z13-v6mr5945377pgj.169.1539359202936; Fri, 12 Oct 2018 08:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539359202; cv=none; d=google.com; s=arc-20160816; b=RGXzmhStKk2z4/VPzeDNETPGwHsQVw/fO5vykUikCHgdxCWaiIaGofDeK5qSoAcg0s bRJDYZz/dVOBCxbMX0jq3RJIRAd9VbQsa154ptl+tRsDyjNx3+1FB3XeKxuR6/JPnJMw d8lBLECuvN30iDrvIi90DrdJaZt/IIgW6TaSuw+dtphxKF+s7o9lh/KjiKhMI+kT5yho vg87vgomBGOcqvw14QXHV1pKZqBszzDd2xY1NMCPdKc6w3isC12zujxaVotcxu8tGZw/ 2/8m9aS4TrBGUgNZGzeB05uutrSxwwe4poVnz2NBxleey4EckHQHOVAjCV1pbUpIW/QN Wweg== 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; bh=semsS59x3BDDLcms9nm3VUq7NMXQapko+SeNMsd/E6w=; b=ZQX+MWNuHvmAzK4LiRr558gvGodPTkpTT0+GBa0xBCpMSgvlynnq2BAP38aErKKjhu PBeP2PPy19XJeF3A6ERIzFyOy7zwz4+HbtBuykxNC7hahxg59QIR8NCl0MBL6UJ7XM+A g5G/ZLNfnhdlJXwUMU/dNjvEbDLeWPfrn4ojfeQkhEaMBhOUSDjPB2atIguyeGE8COVJ hMEkoE1s847PHAnqdyECnSPJaa6djMKw7+ck4OfGDzXaBCQmxNbLYoaIhbpmWBxGqQ67 KRcLK1b9ww9VSr/gSgXDO4qy2VQM8breyqWOk2p5KoPRVE3aIOH+EYbUbz1FhOUYzW3T LSOg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p81-v6si1630878pfd.76.2018.10.12.08.46.28; Fri, 12 Oct 2018 08:46:42 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729173AbeJLXSi (ORCPT + 99 others); Fri, 12 Oct 2018 19:18:38 -0400 Received: from foss.arm.com ([217.140.101.70]:53476 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728786AbeJLXSi (ORCPT ); Fri, 12 Oct 2018 19:18:38 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6765BF; Fri, 12 Oct 2018 08:45:34 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3824A3F5BC; Fri, 12 Oct 2018 08:45:34 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id A668E1AE09F2; Fri, 12 Oct 2018 16:45:34 +0100 (BST) Date: Fri, 12 Oct 2018 16:45:34 +0100 From: Will Deacon To: Sodagudi Prasad Cc: catalin.marinas@arm.com, gregkh@linuxfoundation.org, ard.biesheuvel@linaro.org, robin.murphy@arm.com, ynorov@caviumnetworks.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: livelock with hrtimer cpu_base->lock Message-ID: <20181012154534.GA11387@arm.com> References: <8f671ebb6b331cd00ce17d111f28c548@codeaurora.org> <20181010164919.GA16512@arm.com> <63fae7b2ef8dc4cc67928329cf7fcb60@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63fae7b2ef8dc4cc67928329cf7fcb60@codeaurora.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 12, 2018 at 05:55:28AM -0700, Sodagudi Prasad wrote: > On 2018-10-10 09:49, Will Deacon wrote: > >On Tue, Oct 09, 2018 at 01:56:14PM -0700, Sodagudi Prasad wrote: > >>This is regarding - thread "try to fix contention between expire_timers > >>and > >>try_to_del_timer_sync". > >>https://lkml.org/lkml/2017/7/28/172 > >> > >>I think this live lockup issue was discussed earlier but the final set > >>of > >>changes were not concluded. > > > >Well we basically need a way to pick a value for CPU_RELAX_WFE_THRESHOLD. > >Do you have any ideas? It could be determined at runtime if necessary. > > > > Please share what are values need to be tried for CPU_RELAX_WFE_THRESHOLD. > > It would be great if it can be determined from runtime. Please let me know > if any testing need to be done with dynamic detection patch. I was actually hoping you'd have some ideas about how to write the patch. I don't have a good feel for how to determine this threshold, and you have hardware that needs it... One avenue of exploration might be to tune the fallback to WFE based on what percentage of the eventstream period we've been polling, e.g. 50%. Will