From patchwork Wed Jan 8 18:49:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 22985 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 689AC202E2 for ; Wed, 8 Jan 2014 18:52:31 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id ut6sf8984766igb.1 for ; Wed, 08 Jan 2014 10:52:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=rPbg65ckSzxa71stBgJizY3Wod3jw6sT5DjeWxV8WlI=; b=i9GgSVxSK0/+PBgtkuHxeHSIQ4dOAw6w0weKKjKlZxXLArZqqMuS7FCbR2GdyXja7O 8FIClOPkcPQd9Ke/FFtxxTMuNQIeISOoJxS2oOR44G2O8vDgIpB/t62Oufmr6/0H3tfE qB1PC88Hnc3QHdhnaTxGBj5mNDAJi5THs3TmbneWKIcekihT1HPEdCcX48pA/oG2UssH pB9FG3K8n2xwr8E6CxEWYDb68GBDYluIrt+bTxZQhmLCAHdoC0G0+l8mInJ2jn3hLu+w iqaCpOEaEpY7McOElMAlIZnunK3DcwPD617ufJ4kMXRKkAmUeVF8WgUbGXqSoxDYJBtk 2Jwg== X-Gm-Message-State: ALoCoQn2g/psY1qk4z1QXkw6mgDBn4kZqLVg129RItrFMfLAUXIURDU6jKV4YwBbpE0FWHct3nBi X-Received: by 10.182.89.231 with SMTP id br7mr6910343obb.0.1389207150673; Wed, 08 Jan 2014 10:52:30 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.76.72 with SMTP id i8ls659294qew.59.gmail; Wed, 08 Jan 2014 10:52:30 -0800 (PST) X-Received: by 10.58.133.16 with SMTP id oy16mr4459544veb.74.1389207150530; Wed, 08 Jan 2014 10:52:30 -0800 (PST) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by mx.google.com with ESMTPS id b20si1102462veu.60.2014.01.08.10.52.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Jan 2014 10:52:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.53; Received: by mail-vb0-f53.google.com with SMTP id o19so1429359vbm.26 for ; Wed, 08 Jan 2014 10:52:30 -0800 (PST) X-Received: by 10.58.155.162 with SMTP id vx2mr5740748veb.46.1389207150394; Wed, 08 Jan 2014 10:52:30 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp245683ved; Wed, 8 Jan 2014 10:52:29 -0800 (PST) X-Received: by 10.66.158.132 with SMTP id wu4mr14820269pab.66.1389207149173; Wed, 08 Jan 2014 10:52:29 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si1320591pbg.273.2014.01.08.10.52.28; Wed, 08 Jan 2014 10:52:28 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757325AbaAHSwX (ORCPT + 26 others); Wed, 8 Jan 2014 13:52:23 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:55841 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756881AbaAHSu6 (ORCPT ); Wed, 8 Jan 2014 13:50:58 -0500 X-IronPort-AV: E=Sophos;i="4.95,625,1384300800"; d="scan'208";a="88846947" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 08 Jan 2014 18:50:56 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.2.342.4; Wed, 8 Jan 2014 13:50:56 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1W0yDL-0005sr-54; Wed, 08 Jan 2014 18:50:51 +0000 From: Stefano Stabellini To: CC: , , , , , , , , , , , Stefano Stabellini , , Subject: [PATCH v8 3/6] arm: introduce CONFIG_PARAVIRT, PARAVIRT_TIME_ACCOUNTING and pv_time_ops Date: Wed, 8 Jan 2014 18:49:55 +0000 Message-ID: <1389206998-27875-3-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Introduce CONFIG_PARAVIRT and PARAVIRT_TIME_ACCOUNTING on ARM. The only paravirt interface supported is pv_time_ops.steal_clock, so no runtime pvops patching needed. This allows us to make use of steal_account_process_tick for stolen ticks accounting. Signed-off-by: Stefano Stabellini Acked-by: Christopher Covington CC: linux@arm.linux.org.uk CC: will.deacon@arm.com CC: nico@linaro.org CC: marc.zyngier@arm.com CC: cov@codeaurora.org CC: arnd@arndb.de CC: olof@lixom.net Acked-by: Ian Campbell --- Changes in v7: - ifdef CONFIG_PARAVIRT the content of paravirt.h. Changes in v3: - improve commit description and Kconfig help text; - no need to initialize pv_time_ops; - add PARAVIRT_TIME_ACCOUNTING. --- arch/arm/Kconfig | 20 ++++++++++++++++++++ arch/arm/kernel/Makefile | 1 + 2 files changed, 21 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c1f1a7e..d6c3ba1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1874,6 +1874,25 @@ config SWIOTLB config IOMMU_HELPER def_bool SWIOTLB +config PARAVIRT + bool "Enable paravirtualization code" + ---help--- + This changes the kernel so it can modify itself when it is run + under a hypervisor, potentially improving performance significantly + over full virtualization. + +config PARAVIRT_TIME_ACCOUNTING + bool "Paravirtual steal time accounting" + select PARAVIRT + default n + ---help--- + Select this option to enable fine granularity task steal time + accounting. Time spent executing other tasks in parallel with + the current vCPU is discounted from the vCPU power. To account for + that, there can be a small performance impact. + + If in doubt, say N here. + config XEN_DOM0 def_bool y depends on XEN @@ -1885,6 +1904,7 @@ config XEN depends on !GENERIC_ATOMIC64 select ARM_PSCI select SWIOTLB_XEN + select PARAVIRT help Say Y if you want to run Linux in a Virtual Machine on Xen on ARM. diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index a30fc9b..bcd2b38 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -87,6 +87,7 @@ obj-$(CONFIG_ARM_CPU_TOPOLOGY) += topology.o ifneq ($(CONFIG_ARCH_EBSA110),y) obj-y += io.o endif +obj-$(CONFIG_PARAVIRT) += paravirt.o head-y := head$(MMUEXT).o obj-$(CONFIG_DEBUG_LL) += debug.o