Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2638013ybk; Mon, 18 May 2020 04:21:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUikrdqEEUZY5pn/kq8665VcFRJuP6zcU5Bf4blCSJnBtlR49/qIPrK1iMoJMDpqrPgpuh X-Received: by 2002:a17:906:cd18:: with SMTP id oz24mr15141014ejb.179.1589800910441; Mon, 18 May 2020 04:21:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589800910; cv=none; d=google.com; s=arc-20160816; b=jbzbFbnIzNS8CJUn+cpvcEH0znT2XdYg/rkRmMXmYybUhnrOQjoAXDIf/7Y4S6luRL 5iU19YptrR4hpR8p7ldjV+M/3gy5n0bEur0su3Y6BYPbGjZ8oFPUapUXNRM3UZsCGhjn vOEfeYXa6gure7TyhPFzPFkdVkI++Izc5bDsnOmR+g1QR/+1qLD34geqkAw2cGwvUkuM 65Iz+dsJakK9reh3kHuc1pJDoz1f1ZfoMyf9PwV2p5vGOduRF3ghrH+F/KlOyeHq/Bfy D6WN/jJOHra7ZqUGGG8ZDNdsXrJfj45ATkejIYkDubtQtX4os/b5r79MLHhgy6/bAKz4 dRcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=TSD+l1QmQF19K+Aoy99QURdlQdSUsVfpfVdC/lNoc3o=; b=eT6VOBiRSHWCjR09lqyCoVH60ojOSy7xvkagY7H6dvl9mLoFl3MAdD3hAej7pXieqJ WMhwTnIFWSop7Qz8BYpCjCo9EARSV6w56ESzGsxmK/IbXuqM4A17N82LiSpgLud4s7qW YbhE6h5MuMOVcrxvZgRkhtLJYtsnODDIaTNEZ4i/KszdCsaNX1jmnjDNywIa+IkTtY7C Btog+6q0TaYF3geBdiLRuazfQm/v1H3z8GxZ42/vYzlSZ18uuuACd4vpAEr4ob0M35H8 vLxXiVhEv8hV9ZhhzSgKZLN5p9yLGXF9uKCCASmrYZi6kbz9TVERjAzIy3Y5MFMFWCVI lDLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e3si6032063edj.358.2020.05.18.04.21.26; Mon, 18 May 2020 04:21:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727814AbgERLR1 (ORCPT + 99 others); Mon, 18 May 2020 07:17:27 -0400 Received: from foss.arm.com ([217.140.110.172]:38288 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726590AbgERLR0 (ORCPT ); Mon, 18 May 2020 07:17:26 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 07E9A106F; Mon, 18 May 2020 04:17:26 -0700 (PDT) Received: from [192.168.0.110] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CFEA13F52E; Mon, 18 May 2020 04:17:23 -0700 (PDT) Subject: Re: [PATCH 0/3] arm64: perf: Add support for Perf NMI interrupts To: Mark Rutland , Lecopzer Chen Cc: Sumit Garg , julien.thierry.kdev@gmail.com, Linux Kernel Mailing List , Jian-Lin Chen , alexander.shishkin@linux.intel.com, Catalin Marinas , jolsa@redhat.com, acme@kernel.org, Peter Zijlstra , mingo@redhat.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, namhyung@kernel.org, Will Deacon , yj.chiang@mediatek.com, linux-arm-kernel References: <20200516124857.75004-1-lecopzer@gmail.com> <20200518104524.GA1224@C02TD0UTHF1T.local> From: Alexandru Elisei Message-ID: Date: Mon, 18 May 2020 12:17:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200518104524.GA1224@C02TD0UTHF1T.local> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 5/18/20 11:45 AM, Mark Rutland wrote: > Hi all, > > On Mon, May 18, 2020 at 02:26:00PM +0800, Lecopzer Chen wrote: >> HI Sumit, >> >> Thanks for your information. >> >> I've already implemented IPI (same as you did [1], little difference >> in detail), hardlockup detector and perf in last year(2019) for >> debuggability. >> And now we tend to upstream to reduce kernel maintaining effort. >> I'm glad if someone in ARM can do this work :) >> >> Hi Julien, >> >> Does any Arm maintainers can proceed this action? > Alexandru (Cc'd) has been rebasing and reworking Julien's patches, which > is my preferred approach. > > I understand that's not quite ready for posting since he's investigating > some of the nastier subtleties (e.g. mutual exclusion with the NMI), but > maybe we can put the work-in-progress patches somewhere in the mean > time. > > Alexandru, do you have an idea of what needs to be done, and/or when you > expect you could post that? I'm currently working on rebasing the patches on top of 5.7-rc5, when I have something usable I'll post a link (should be a couple of days). After that I will address the review comments, and I plan to do a thorough testing because I'm not 100% confident that some of the assumptions around the locks that were removed are correct. My guess is this will take a few weeks. Thanks, Alex > > Thanks, > Mark. > >> This is really useful in debugging. >> Thank you!! >> >> >> >> [1] https://lkml.org/lkml/2020/4/24/328 >> >> >> Lecopzer >> >> Sumit Garg 於 2020年5月18日 週一 下午1:46寫道: >>> + Julien >>> >>> Hi Lecopzer, >>> >>> On Sat, 16 May 2020 at 18:20, Lecopzer Chen wrote: >>>> These series implement Perf NMI funxtionality and depends on >>>> Pseudo NMI [1] which has been upstreamed. >>>> >>>> In arm64 with GICv3, Pseudo NMI was implemented for NMI-like interruts. >>>> That can be extended to Perf NMI which is the prerequisite for hard-lockup >>>> detector which had already a standard interface inside Linux. >>>> >>>> Thus the first step we need to implement perf NMI interface and make sure >>>> it works fine. >>>> >>> This is something that is already implemented via Julien's patch-set >>> [1]. Its v4 has been floating since July, 2019 and I couldn't find any >>> major blocking comments but not sure why things haven't progressed >>> further. >>> >>> Maybe Julien or Arm maintainers can provide updates on existing >>> patch-set [1] and how we should proceed further with this interesting >>> feature. >>> >>> And regarding hard-lockup detection, I have been able to enable it >>> based on perf NMI events using Julien's perf patch-set [1]. Have a >>> look at the patch here [2]. >>> >>> [1] https://patchwork.kernel.org/cover/11047407/ >>> [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2020-May/732227.html >>> >>> -Sumit >>> >>>> Perf NMI has been test by dd if=/dev/urandom of=/dev/null like the link [2] >>>> did. >>>> >>>> [1] https://lkml.org/lkml/2019/1/31/535 >>>> [2] https://www.linaro.org/blog/debugging-arm-kernels-using-nmifiq >>>> >>>> >>>> Lecopzer Chen (3): >>>> arm_pmu: Add support for perf NMI interrupts registration >>>> arm64: perf: Support NMI context for perf event ISR >>>> arm64: Kconfig: Add support for the Perf NMI >>>> >>>> arch/arm64/Kconfig | 10 +++++++ >>>> arch/arm64/kernel/perf_event.c | 36 ++++++++++++++++++------ >>>> drivers/perf/arm_pmu.c | 51 ++++++++++++++++++++++++++++++---- >>>> include/linux/perf/arm_pmu.h | 6 ++++ >>>> 4 files changed, 88 insertions(+), 15 deletions(-) >>>> >>>> -- >>>> 2.25.1 >>>> >>>> >>>> _______________________________________________ >>>> linux-arm-kernel mailing list >>>> linux-arm-kernel@lists.infradead.org >>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel