Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp9027519ybc; Fri, 29 Nov 2019 23:00:33 -0800 (PST) X-Google-Smtp-Source: APXvYqyGMSnew18INBOiq/dcQoiYMLZpcD1fR35fZ4cuVKhrJU6DcwLdhz7sXsK6PIUfKmbuos04 X-Received: by 2002:aa7:cccf:: with SMTP id y15mr14326338edt.108.1575097233065; Fri, 29 Nov 2019 23:00:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575097233; cv=none; d=google.com; s=arc-20160816; b=ZRcC914+TD6gQP5/IpvX7ZliwFQMtvHQ6NYumlMd9lGFSsNqGEbxa4Woij2y/ko8fr rruezCioge2FM9QNYd70NnPPN6EZJPUn1AyvDYg86EgrZlW3cmdC9fWot+kwHF75B9pj auWBH7ssNID8FQhPBPToIauEHZoBc9yNb+tC6ZVDzJqX5JnzfjvJa9F85oyAGd7cgbVa 5hkjxNOq5t3VSufcdvG7dvBwApiAb5+pq7hfw0d53p6YJ6EZ6mekGFlUbf4jQPa0gaOX sxz6NrUvCxPU3xR5LyY/GMWRIZjahac45PMy6uDWkUs8AWmqM+rq8r+GT8Vk+94LmYJC RnFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=Wp0/PKIJWdCXc9lo3T/2ak3Pzf8KiV7WEbOAoa0X0+8=; b=M2pE1rFg/aRxhP+h7gGFd5qDZ6/0vCVixoCQDx5ZoghBoJI+jFGfEi4obMEv0anQ20 fkvhkAl1ZlsNXd8W/+7mogbKpYtF289BmGwTBblQ5lLvusUmxwgfAsY/iGk2umjEKD4b 7vOOKnxTsxmhyDKu7poFpk2uMlFhDHVf/SFf7nNe6m5AcMshXgoKJCLciS1yzkbny3nr LF7HUAqQKsegJ8MrmrgMPhnKPUC9/5k6ezKRBkPjMezQWKrFDP1AGrFcJ+r6fJmJKNRh QU4va2Fp/CNsOoWTQj/KcYJXfTDfpt+KafmI1eNKY24gqaQ5rSDjZcSM2Hj14n06sENE lJ4g== 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 jr23si15755801ejb.369.2019.11.29.23.00.08; Fri, 29 Nov 2019 23:00:33 -0800 (PST) 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 S1725897AbfK3G60 (ORCPT + 99 others); Sat, 30 Nov 2019 01:58:26 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:6737 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725298AbfK3G60 (ORCPT ); Sat, 30 Nov 2019 01:58:26 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 98767B9740C456E26BB8; Sat, 30 Nov 2019 14:58:24 +0800 (CST) Received: from [127.0.0.1] (10.133.216.73) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Sat, 30 Nov 2019 14:58:17 +0800 Subject: Re: [PATCH] kvm/arm64: change gicv3_cpuif to static likely branch To: Marc Zyngier References: <20191130031443.41696-1-guoheyi@huawei.com> <86mucdzx45.wl-maz@kernel.org> CC: , , , , James Morse , Julien Thierry , "Suzuki K Poulose" , Will Deacon From: Guoheyi Message-ID: <496cb45d-c312-295c-18f2-633ec5acc976@huawei.com> Date: Sat, 30 Nov 2019 14:58:16 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <86mucdzx45.wl-maz@kernel.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.216.73] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/11/30 14:39, Marc Zyngier wrote: > On Sat, 30 Nov 2019 03:14:43 +0000, > Heyi Guo wrote: >> Platforms running hypervisor nowadays are normally powerful servers >> which at least support GICv3, so it should be better to switch >> kvm_vgic_global_state.gicv3_cpuif to static likely branch, which can >> reduce two "b" instructions to a single "nop" for GICv3 branches. >> >> We don't update arm32 specific code for they may still only have >> GICv2. > There is a number of disputable statements here. > > Out of the fairly large zoo of arm64 systems I have access to, 75% of > them are based on GICv2, so they are still the overwhelming majority. > Yes, they all run KVM (otherwise I would ignore them). Really? I'm surprised to know that... Sorry I didn't see such GICv2 platforms in my work, so I made the wrong assumption. I don't expect much performance improvement for GICv3 platforms. The precondition for this patch is that few platforms running KVM are using GICv2. If it is not right, please just ignore it. Thanks, HG > > Furthermore, I would expect that "powerful servers" are perfectly > capable to execute a couple of branches without breaking a sweat. > > Finally, you don't provide any number supporting that: > > - GICv3 systems see a performance improvement across the large variety > of CPU implementations > - GICv2 systems don't see a performance regression > > Once you provide such numbers, I'll reevaluate my position. Until > then, I'm not considering this kind of change. > > Thanks, > > M. >