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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 30501C432C0 for ; Sat, 30 Nov 2019 06:39:32 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 9DCA72075C for ; Sat, 30 Nov 2019 06:39:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DCA72075C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id CC8334AEAB; Sat, 30 Nov 2019 01:39:30 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id THWLmlOqHQX3; Sat, 30 Nov 2019 01:39:29 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id ADD4E4AECA; Sat, 30 Nov 2019 01:39:29 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 96E3C4AEC2 for ; Sat, 30 Nov 2019 01:39:28 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GeZGcQ5kxs-T for ; Sat, 30 Nov 2019 01:39:26 -0500 (EST) Received: from inca-roads.misterjones.org (inca-roads.misterjones.org [213.251.177.50]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 7C02F4AEAB for ; Sat, 30 Nov 2019 01:39:26 -0500 (EST) Received: from 29-193-142-46.pool.kielnet.net ([46.142.193.29] helo=big-swifty.misterjones.org) by cheepnis.misterjones.org with esmtpsa (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.80) (envelope-from ) id 1iawPa-0000Jo-F1; Sat, 30 Nov 2019 07:39:22 +0100 Date: Sat, 30 Nov 2019 06:39:22 +0000 Message-ID: <86mucdzx45.wl-maz@kernel.org> From: Marc Zyngier To: Heyi Guo Subject: Re: [PATCH] kvm/arm64: change gicv3_cpuif to static likely branch In-Reply-To: <20191130031443.41696-1-guoheyi@huawei.com> References: <20191130031443.41696-1-guoheyi@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 46.142.193.29 X-SA-Exim-Rcpt-To: guoheyi@huawei.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, wanghaibin.wang@huawei.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Will Deacon , kvmarm@lists.cs.columbia.edu X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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). 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. -- Jazz is not dead, it just smells funny. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 84B09C432C0 for ; Sat, 30 Nov 2019 06:39:35 +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 32F552075C for ; Sat, 30 Nov 2019 06:39:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IPGmgF1B" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32F552075C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vlR43QAV0Z8bJtjTUQFm6oCeV9PuC71DjRhXhVQYtWs=; b=IPGmgF1BYlUNgp vqztjMzUzgwY5IqELaarlNvyeuu6n6l9jy4fYYpvB6Ob3KPEPV2rYj0O3tq21qUgR+GXiKnDOaGek OdEZHl3Etx9NKZrSF91XnZ0iAwBxaxf/HI34dvWgQCDQwjr1lKvPGUhBRthLa+gNnOCfM2krwQM2L nBBDfAB9X0x81/580NP/Cv9mGWzCS1Etcj6XPAx/tci7QT+l+qcB7rH/O/D8a88FWlBh4Vsf7razU W9PjwH6h6B7CUdjsmyMW7LxJAJjTcRqvPyz2U8NKqJl9euE76jCuRdxpjhi1LdavaMSZxv2RdKHuy BKT0QiCBcBKDqcRt8Xgg==; 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 1iawPk-0005tI-IM; Sat, 30 Nov 2019 06:39:32 +0000 Received: from inca-roads.misterjones.org ([213.251.177.50]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iawPh-0005sH-If for linux-arm-kernel@lists.infradead.org; Sat, 30 Nov 2019 06:39:31 +0000 Received: from 29-193-142-46.pool.kielnet.net ([46.142.193.29] helo=big-swifty.misterjones.org) by cheepnis.misterjones.org with esmtpsa (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.80) (envelope-from ) id 1iawPa-0000Jo-F1; Sat, 30 Nov 2019 07:39:22 +0100 Date: Sat, 30 Nov 2019 06:39:22 +0000 Message-ID: <86mucdzx45.wl-maz@kernel.org> From: Marc Zyngier To: Heyi Guo Subject: Re: [PATCH] kvm/arm64: change gicv3_cpuif to static likely branch In-Reply-To: <20191130031443.41696-1-guoheyi@huawei.com> References: <20191130031443.41696-1-guoheyi@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 46.142.193.29 X-SA-Exim-Rcpt-To: guoheyi@huawei.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, wanghaibin.wang@huawei.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191129_223929_765096_B5EAB90E X-CRM114-Status: GOOD ( 10.30 ) 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: Suzuki K Poulose , linux-kernel@vger.kernel.org, James Morse , linux-arm-kernel@lists.infradead.org, wanghaibin.wang@huawei.com, Will Deacon , kvmarm@lists.cs.columbia.edu, Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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). 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. -- Jazz is not dead, it just smells funny. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 9065EC43215 for ; Sat, 30 Nov 2019 06:39:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 617DE2075C for ; Sat, 30 Nov 2019 06:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575095972; bh=nsROPI9Ejx/egACKGY46mA8v3oLX9QMNSyX5jdO6wBo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=hC2OowhG/wGzr0+LaWsG+rUU7Aab/uv8ExvvSvI4ZO4pxYRoTC6P4wQD0CFL70S+X 25ot8ld7nq3KCFCELvjdXZYwlyaohDwTxVSxGwbgZUkFHgxw+gi/HP0rUd6dpoK5ar EeCvlJuQsI1DlfPH1xtIdjF91ZOalZjm1v6XfXeA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725899AbfK3Gj3 (ORCPT ); Sat, 30 Nov 2019 01:39:29 -0500 Received: from inca-roads.misterjones.org ([213.251.177.50]:50506 "EHLO inca-roads.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbfK3Gj2 (ORCPT ); Sat, 30 Nov 2019 01:39:28 -0500 Received: from 29-193-142-46.pool.kielnet.net ([46.142.193.29] helo=big-swifty.misterjones.org) by cheepnis.misterjones.org with esmtpsa (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.80) (envelope-from ) id 1iawPa-0000Jo-F1; Sat, 30 Nov 2019 07:39:22 +0100 Date: Sat, 30 Nov 2019 06:39:22 +0000 Message-ID: <86mucdzx45.wl-maz@kernel.org> From: Marc Zyngier To: Heyi Guo Cc: , , , , James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon Subject: Re: [PATCH] kvm/arm64: change gicv3_cpuif to static likely branch In-Reply-To: <20191130031443.41696-1-guoheyi@huawei.com> References: <20191130031443.41696-1-guoheyi@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-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: 46.142.193.29 X-SA-Exim-Rcpt-To: guoheyi@huawei.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, wanghaibin.wang@huawei.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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). 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. -- Jazz is not dead, it just smells funny.