From patchwork Mon May 9 09:54:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuad Tabba X-Patchwork-Id: 12843276 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8BF5FC433F5 for ; Mon, 9 May 2022 09:57:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Tuxsqqq8rOOnHPwrDLokmk//ZTM1kZ9CPUBY889uFaE=; b=XSWJS4MS/fMb9KqK7D7F7+P8GB O/oYcXDiZtxKpCo9y5CPKICZ+l1ts2elwLQk3KPhc9eXwwnobybqSqKWFkQvFzJE8+NNUHcVIXRUg 2bYR8hm+l9K9W4HwZMguP4VSrgcmsGiat3IZP+dFuKMkslcrP2khf3BysC4DT1uURZar/9QLeBWrx yvv7DGyE5kuHMcmMCYd/h8knN7jP7TzeU1LT++kSvGvjuZjm3IhckpeD2XPr2LnkSL2XlOzuI3C6D 8x2F2CbjEpmWPhYYVzwtybZjMtfsEUR7VACadLuAVtL4X5J6Gw1OIAfLVs24RpsNMoPh+6zw04Iqh rcXvYgRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1no07T-00Dbl0-IP; Mon, 09 May 2022 09:55:59 +0000 Received: from mail-wm1-x34a.google.com ([2a00:1450:4864:20::34a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1no06f-00DbKN-0A for linux-arm-kernel@lists.infradead.org; Mon, 09 May 2022 09:55:10 +0000 Received: by mail-wm1-x34a.google.com with SMTP id i131-20020a1c3b89000000b00393fbb0718bso9684876wma.0 for ; Mon, 09 May 2022 02:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=2IAt5dQwtvAG3RiQIn69aK8zHEfSjm99svJSdYnazxI=; b=lpH/+8as281hqZUxcSof0AoV/+svBOb/BCwMDi41vDXH9SwuutgTMB5yi3bUlWwbLJ b39iTziQbmuFtZH6DVCTx3bNMhcx1cmP7ZwYo0jDyx3yR8OKrE51S7ZhQLPx7wLCPezD qw9UBItkGlt2s3mJ2zdwyB0c8RxfS4YgVbrq4sHM3EO9ZRqwDW5MW8T9HgBK+sMUwRe6 RKpjxAJ3ROb9lFSZI1FeIO16FudM8JP1T7t5O1fuWTBlIgNkIPK74yUsCnWdPinSB08k GZJ6SQOV8++xqGdrxAOAP/nozCrVdIt02DO/U8kReiP0oCwqiKxWdvTeq+Zgzi3ku0Fq VZXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=2IAt5dQwtvAG3RiQIn69aK8zHEfSjm99svJSdYnazxI=; b=ZcP0bHjb60ToqxxK043dJ91OJD3M104ms8q6SNz5SMPz+iMphHYVWYuaKnaAfLWVlS A73mK3bJINMK8Gb2VhVLxW7WlkeppjD1ND0JyrsSKiAFM8h+MoSyI8lCYpNIU238S/AV hW1LrVQXSx+jhJEDdqtsqbn7V4vy7axIBNqtozH3isFc92n7Ppvx/N7Nl9twYIKRuJQ2 QBP11RDWFLuRzLAp8TTZsKmEseLYA6jfV12qR5x2tVmZyzyv2L1EucduZDdRLRHuYnS+ dopFmKPSqe0LZxcW+WX+UX8Nq359JJEeJZ5QaJQC9xKS832w2ciRxtIOsCzacfOwza5L be7w== X-Gm-Message-State: AOAM5314bshLAz7fkFgfZhphy5MaQ3vmJXt9I+9EUnJrT0qXcv93r5PC wy2x7FCVGdUnuMVFuJ4DbxL+Y1aJYg== X-Google-Smtp-Source: ABdhPJyC1Cd7Hn9V24FAKY2cwQpn+sYGG7AiMinZ6qOXBOKNN+drqBQy8/nob6iXaFvhd8gd8GjJzPgaqQ== X-Received: from fuad.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1613]) (user=tabba job=sendgmr) by 2002:a05:600c:501e:b0:394:8b0a:3ec9 with SMTP id n30-20020a05600c501e00b003948b0a3ec9mr6214776wmr.0.1652090107148; Mon, 09 May 2022 02:55:07 -0700 (PDT) Date: Mon, 9 May 2022 09:54:58 +0000 In-Reply-To: <20220509095500.2408785-1-tabba@google.com> Message-Id: <20220509095500.2408785-3-tabba@google.com> Mime-Version: 1.0 References: <20220509095500.2408785-1-tabba@google.com> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog Subject: [PATCH v2 2/4] KVM: arm64: Repack struct kvm_pmu to reduce size From: Fuad Tabba To: kvmarm@lists.cs.columbia.edu Cc: maz@kernel.org, will@kernel.org, qperret@google.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, drjones@redhat.com, linux-arm-kernel@lists.infradead.org, tabba@google.com, kernel-team@android.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220509_025509_074655_11396047 X-CRM114-Status: GOOD ( 11.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org struct kvm_pmu has 2 holes using 10 bytes. This is instantiated in all vcpus, so it adds up. This repacking removes all holes. No functional change intended. Signed-off-by: Fuad Tabba --- include/kvm/arm_pmu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h index 20193416d214..eaa8290b116f 100644 --- a/include/kvm/arm_pmu.h +++ b/include/kvm/arm_pmu.h @@ -21,12 +21,12 @@ struct kvm_pmc { }; struct kvm_pmu { - int irq_num; + struct irq_work overflow_work; struct kvm_pmc pmc[ARMV8_PMU_MAX_COUNTERS]; DECLARE_BITMAP(chained, ARMV8_PMU_MAX_COUNTER_PAIRS); + int irq_num; bool created; bool irq_level; - struct irq_work overflow_work; }; struct arm_pmu_entry {