From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F851C2D0EA for ; Thu, 9 Apr 2020 07:02:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E903720B1F for ; Thu, 9 Apr 2020 07:02:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726523AbgDIHCq (ORCPT ); Thu, 9 Apr 2020 03:02:46 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2645 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725783AbgDIHCq (ORCPT ); Thu, 9 Apr 2020 03:02:46 -0400 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id 0F0463508B4D76666315; Thu, 9 Apr 2020 08:02:45 +0100 (IST) Received: from [127.0.0.1] (10.47.11.47) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Thu, 9 Apr 2020 08:02:44 +0100 Subject: Re: [RFC PATCH] perf/smmuv3: Fix shared interrupt handling To: Robin Murphy , "will@kernel.org" , "mark.rutland@arm.com" CC: "linux-arm-kernel@lists.infradead.org" , Shameerali Kolothum Thodi , "harb@amperecomputing.com" , "tuanphan@os.amperecomputing.com" , "linux-kernel@vger.kernel.org" References: From: John Garry Message-ID: <34dd7c2e-b6db-684f-f0a2-73f2e6951308@huawei.com> Date: Thu, 9 Apr 2020 08:02:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.11.47] X-ClientProxiedBy: lhreml738-chm.china.huawei.com (10.201.108.188) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/04/2020 17:49, Robin Murphy wrote: > IRQF_SHARED is dangerous, since it allows other agents to retarget the > IRQ's affinity without migrating PMU contexts to match, breaking the way > in which perf manages mutual exclusion for accessing events. Although > this means it's not realistically possible to support PMU IRQs being > shared with other drivers, we *can* handle sharing between multiple PMU > instances with some explicit affinity bookkeeping and manual interrupt > multiplexing. Hi Robin, Out of curiosity, do we even need to support shared interrupts for any implementations today? D06 board: john@ubuntu:~$ more /proc/interrupts | grep smmuv3-pmu 989: 0 0 0 0 ITS-pMSI 133120 Edge smmuv3-pmu 990: 0 0 0 0 ITS-pMSI 135168 Edge smmuv3-pmu 991: 0 0 0 0 ITS-pMSI 137216 Edge smmuv3-pmu 992: 0 0 0 0 ITS-pMSI 139264 Edge smmuv3-pmu 993: 0 0 0 0 ITS-pMSI 141312 Edge smmuv3-pmu 994: 0 0 0 0 ITS-pMSI 143360 Edge smmuv3-pmu 995: 0 0 0 0 ITS-pMSI 145408 Edge smmuv3-pmu 996: 0 0 0 0 ITS-pMSI 147456 Edge smmuv3-pmu Thanks, John From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87367C2D0EA for ; Thu, 9 Apr 2020 07:21:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFD3220753 for ; Thu, 9 Apr 2020 07:21:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="G+rbWSmn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFD3220753 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kzyxEUEU2FOR2iO+DVT2REb1sSFFmMEdoRcIvr5lGK8=; b=G+rbWSmnwUj/rTnN+72TBGVP0 QXmUHTIRBHepWPsjth+jVZd/WBdj3Qpl19+r5wdxNIsSoVOXGxDy5XQMoAxic8cSXeZrmmw3mYgzI ZTnFI/g1kKNxmphiwgdog9Pn0Kwumooo/5M6288jYVNJrhfqYZ9or1WRKtxVgv6/75hWYzGlfUnyU JD3YW02R3sI75A8Mnkm/2KjMeGwQ26/0Ga4WLSWW7K0uDv+OLVlG0Lex4hwvfVZnHTrtHpugdyYLP oJ9wndJbOWjoOD9UaXpxGohqTiRfSAo6CR2gzZD1HWAyIpBSOBA7cqsinUk4SG/Y75dmxG9pOPBfy rat48xMZA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMRDI-0008Vh-RD; Thu, 09 Apr 2020 07:03:00 +0000 Received: from lhrrgout.huawei.com ([185.176.76.210] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jMRDF-0008UO-KC for linux-arm-kernel@lists.infradead.org; Thu, 09 Apr 2020 07:02:59 +0000 Received: from lhreml724-chm.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id 0F0463508B4D76666315; Thu, 9 Apr 2020 08:02:45 +0100 (IST) Received: from [127.0.0.1] (10.47.11.47) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Thu, 9 Apr 2020 08:02:44 +0100 Subject: Re: [RFC PATCH] perf/smmuv3: Fix shared interrupt handling To: Robin Murphy , "will@kernel.org" , "mark.rutland@arm.com" References: From: John Garry Message-ID: <34dd7c2e-b6db-684f-f0a2-73f2e6951308@huawei.com> Date: Thu, 9 Apr 2020 08:02:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.47.11.47] X-ClientProxiedBy: lhreml738-chm.china.huawei.com (10.201.108.188) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200409_000257_811311_EE5D689F X-CRM114-Status: UNSURE ( 8.71 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "harb@amperecomputing.com" , "tuanphan@os.amperecomputing.com" , Shameerali Kolothum Thodi , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 08/04/2020 17:49, Robin Murphy wrote: > IRQF_SHARED is dangerous, since it allows other agents to retarget the > IRQ's affinity without migrating PMU contexts to match, breaking the way > in which perf manages mutual exclusion for accessing events. Although > this means it's not realistically possible to support PMU IRQs being > shared with other drivers, we *can* handle sharing between multiple PMU > instances with some explicit affinity bookkeeping and manual interrupt > multiplexing. Hi Robin, Out of curiosity, do we even need to support shared interrupts for any implementations today? D06 board: john@ubuntu:~$ more /proc/interrupts | grep smmuv3-pmu 989: 0 0 0 0 ITS-pMSI 133120 Edge smmuv3-pmu 990: 0 0 0 0 ITS-pMSI 135168 Edge smmuv3-pmu 991: 0 0 0 0 ITS-pMSI 137216 Edge smmuv3-pmu 992: 0 0 0 0 ITS-pMSI 139264 Edge smmuv3-pmu 993: 0 0 0 0 ITS-pMSI 141312 Edge smmuv3-pmu 994: 0 0 0 0 ITS-pMSI 143360 Edge smmuv3-pmu 995: 0 0 0 0 ITS-pMSI 145408 Edge smmuv3-pmu 996: 0 0 0 0 ITS-pMSI 147456 Edge smmuv3-pmu Thanks, John _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel