From patchwork Tue May 10 09:57:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuad Tabba X-Patchwork-Id: 12844751 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 327B3C4332F for ; Tue, 10 May 2022 09:58:41 +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=nqx2tm7ztm1JkV7/VKyvtLV6sbPshNnOzJolAfMGcqM=; b=Q5Y0LwFC+cj861JYLFk/jfuCiF jA7MQQ/a3uL4tWApFNdanHH0hF/ScmozpSIZa4o1/L6VulYXKlpeQ/0BVPrt8dbwHq5+CFouvRUfD QHc7nu5DAZ/WMHXv8pQhnFHF+cuVuTLAfT2JbrGcqN/CnfrQOgX9zK9Tp6x+dpxA41/HW8/p3IAs3 3Wb7nxmfi7c+K9626/yW6hEqsOp/JzMMVp8YUkzLwPTN/dm02QB6nqVSCNHJHcCpHjdsl7gSkzQxl Kqx4a/v1e7lBaSvjJ1WT9wRboSAgUJZd9LXqhCsKsNxHwWXDLEssTO+aqaGPYALozIXHtvgWueFvs giH2Ruvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1noMcg-0010xW-VZ; Tue, 10 May 2022 09:57:43 +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 1noMcI-0010mL-GG for linux-arm-kernel@lists.infradead.org; Tue, 10 May 2022 09:57:19 +0000 Received: by mail-wm1-x34a.google.com with SMTP id bi5-20020a05600c3d8500b0039489e1d18dso1038585wmb.5 for ; Tue, 10 May 2022 02:57:17 -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=4qfi1EyfzrAF17+2Q3vwA2/NLnPP5Sk/AW+fkoZOXmg=; b=Z35kcWzQCyc0/bgmoXEQqd04oE3P3i58RdxLoNVzcFf9aRRH2ZdLk8CKxbpiwmuekE wmQb457pslsukEJOJbgp6RJM5XJAUf1svZqei9GW5UR+07V7fQkMUstay9+aCOsPVwxz qQb8PUj20Ac8wsYwgFiAfCDNOJ/lAQCvXJ9covjO8jGSQhoTfMiIFEY97vShdao+1tym 76DvaTxgSoSmHK6kAGvoeXmi/vXP1lZGfhJdx3vRb1aoGcLp0eEzJNaIO2IyoFftfItv 9kmcuj87Et9SPGkBp4c4vgyqZXB4olQQgPVaTVs7pJ+QMl04tf1DAm0w1BNV8x7Q/mb9 DYUQ== 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=4qfi1EyfzrAF17+2Q3vwA2/NLnPP5Sk/AW+fkoZOXmg=; b=sq2t9rOnHpT3Kz1uwUSS2LwU3DhVKeLbHsKGpOHPY6v8OwCMoQTJb04c2LKqtyqjKU H1lTeewFBSINHloQa/qVGBkR6lGFjmwR62HBjh5MXrsPbhSBTvBUX/TSx6mZ/UDg0Ahz wJI5ftEX1bYGxFY3+/sgFOGd6uk9NKkiS2bcsXWQE8b9QgjH6HvJSjApsHgWfJgUE2WX MkzX6U2ODJ9uY2mtOVpAr3Xcj/d8iQwqBFU6LG7K3I6E/LfGCZMa+HRBxSlvi3fnsc1J uAWY4UcOeoNwrKGZ8c7UYje/bnPktbyhctn6rCDCL8KwTrB1PlmgdVsbtk/ytIGxBZjX 48XQ== X-Gm-Message-State: AOAM533TRaYUG72To5S4RQO/+n+dYwaQ0pNgeVAPYghre1fYAnsuHx98 mIeJxKaxHfqr4KZ+Cj5Cak8tBd9gIA== X-Google-Smtp-Source: ABdhPJx45MlpCKopCtV4MwMconf+bzC+zG0kq7MrmyagGdL8LTEIOWRQrf/j8rQrG1mUQKHBc7UCeGq4Wg== X-Received: from fuad.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1613]) (user=tabba job=sendgmr) by 2002:a05:600c:4f8d:b0:394:939f:bd2f with SMTP id n13-20020a05600c4f8d00b00394939fbd2fmr8148434wmq.16.1652176636198; Tue, 10 May 2022 02:57:16 -0700 (PDT) Date: Tue, 10 May 2022 09:57:08 +0000 In-Reply-To: <20220510095710.148178-1-tabba@google.com> Message-Id: <20220510095710.148178-3-tabba@google.com> Mime-Version: 1.0 References: <20220510095710.148178-1-tabba@google.com> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog Subject: [PATCH v4 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, oupton@google.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-20220510_025718_578935_5D54F848 X-CRM114-Status: GOOD ( 11.47 ) 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. Repack the structures to remove the holes. No functional change intended. Reviewed-by: Oliver Upton 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 {