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=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 7E68CC433C1 for ; Mon, 29 Mar 2021 11:29:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 450796193A for ; Mon, 29 Mar 2021 11:29:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229468AbhC2L3Q (ORCPT ); Mon, 29 Mar 2021 07:29:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:55790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230402AbhC2L2r (ORCPT ); Mon, 29 Mar 2021 07:28:47 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E212B6157F; Mon, 29 Mar 2021 11:28:46 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lQq4a-004Qv3-O8; Mon, 29 Mar 2021 12:28:44 +0100 Date: Mon, 29 Mar 2021 12:28:44 +0100 Message-ID: <87tuouqjv7.wl-maz@kernel.org> From: Marc Zyngier To: Jingyi Wang Cc: , , , , , Subject: Re: [RFC PATCH 1/3] irqchip/gic-v3: Make use of ICC_SGI1R IRM bit In-Reply-To: <7e44b7a1-4a12-86bf-4651-aa6a03c4f832@huawei.com> References: <20210329085210.11524-1-wangjingyi11@huawei.com> <20210329085210.11524-2-wangjingyi11@huawei.com> <87wntqqo6s.wl-maz@kernel.org> <7e44b7a1-4a12-86bf-4651-aa6a03c4f832@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: wangjingyi11@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, wanghaibin.wang@huawei.com, yuzenghui@huawei.com, zhukeqian1@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 Mar 2021 11:38:04 +0100, Jingyi Wang wrote: > > > > On 3/29/2021 5:55 PM, Marc Zyngier wrote: > > On Mon, 29 Mar 2021 09:52:08 +0100, > > Jingyi Wang wrote: > >> > >> IRM, bit[40] in ICC_SGI1R, determines how the generated SGIs > >> are distributed to PEs. If the bit is set, interrupts are routed > >> to all PEs in the system excluding "self". We use cpumask to > >> determine if this bit should be set and make use of that. > >> > >> This will reduce vm trap when broadcast IPIs are sent. > > > > I remember writing similar code about 4 years ago, only to realise > > what: > > > > - the cost of computing the resulting mask is pretty high for large > > machines > > - Linux almost never sends broadcast IPIs, so the complexity was all > > in vain > > > > What changed? Please provide supporting data showing how many IPIs we > > actually save, and for which workload. > Maybe we can implement send_IPI_allbutself hooks as other some other > archs instead of computing cpumask here? The question remains: how often is that used? x86 uses it only for NMI (we don't broadcast our pseudo-NMI) and reboot, it seems. Anything I missed? Do we have a different use case on arm64? At the moment, this doesn't seem very useful. Thanks, M. -- Without deviation from the norm, progress is not possible.