From patchwork Mon May 9 12:03:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuad Tabba X-Patchwork-Id: 12843372 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 81DF0C433EF for ; Mon, 9 May 2022 12:04:49 +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=inVJni9/faOR4AvWzaCbr9L4SK vu1rFbac8L2SQxwjbObAa3WcqVva4QfOyY45UAPNgc3FRI8i2yWM11evnlh26jtorjUYMVqOCvX9X 1182AlSdcppQRgUFHmZWaYPhHPHjx6uztfwz1OepPnC5IdNu74FaHztYnwyqcY5PaJkluuQgup3Sv RMURdIjEDk8X5siX5KAAHNEZ02n1/X0jNNaEI8RaFfdLmA33lLQ/Nxx7TCk/UxtFotAVzJGXQGIDa EjWfj2n6Cfi0kgt0z+3CNKDdWHk9hh4Tb1yEZHIs5eLk/sqT6yrrUSlZiNeFC/pMjNbqLO53uLwlo V3lIZ3fQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1no27A-00EEOC-2k; Mon, 09 May 2022 12:03:48 +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 1no271-00EEJz-9G for linux-arm-kernel@lists.infradead.org; Mon, 09 May 2022 12:03:40 +0000 Received: by mail-wm1-x34a.google.com with SMTP id g3-20020a7bc4c3000000b0039409519611so4163537wmk.9 for ; Mon, 09 May 2022 05:03:37 -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=T1bQmY5WMqOoiA4dWgHSRCNBGFwy1srzW/sn5dDbu/tX5JK4d1r0efExShdnPH4FKY /7sMlCHKqZI/4LQSakBTvSPq5yF+A1xZBtutXmShFYAsJ6SLCaMiiQcYmwzS83T8hMmR cTXjqaQgJAF2VUY3jx440mqoJAIwUVKF+zVdzrHe2X3+pXZI6AXHuTm2UbkAfCnecbrQ miAuOlrpmV+ejeMJNSOG0LjqzGo99Xroc52ljiDRnl9qwwdB3h0Q47xoAOvhGzV4Bp2e xPBFo9bvKM4nakO5w0MsKfyHuThWnJqziMTZZw5y41Yg6K6pwrMe93kmGU6VeZ5oEz+L 5h6A== 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=AyvLTpfij8PBG5B38qLXUUMCX+wRqprMGojtK8Z9Jx/ERrCwG9xxWXFd3bivpttB9Q s8C2KkeTHbqpBQpBlR1dZQnvlrifby+6kLeaATn/glSxeo1DbyvQHCs3naXOHbD7Lcmc 0TtulVSnxkqMxidtJOt7FZJFHsY3d/B40IQ9luUUBMXGLq2Sf7d7ryGBEAvezMe6zBaL YPkODk7KPseCqfGic3g709gIOYZKx6byoMUMHEJuo/ZoLqiGuSTReKlrj1JDM4rQmNEc 1bwE4N8jEc2b5ukG5HJHfNp0ePpbQL2/S+CW+0RWR3iXpMDAu8zOf5CGova14LI5N280 fXjA== X-Gm-Message-State: AOAM532mb1XL/a7FlMMrZGblVYHw45wc6kMRnMlwQ9mURk1wDNrb8JyY Mlaa0qBiBfgckP8UhVKkv4iJmRkKJg== X-Google-Smtp-Source: ABdhPJw4M7oFpKwBkZ4zAMju5qT2mCDPBgJJ6xbvDi4JbpFYlfoWDnry00S6CaUCcw0l/QUQc+MjRkpkLg== X-Received: from fuad.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1613]) (user=tabba job=sendgmr) by 2002:a7b:c4d8:0:b0:393:fecd:2718 with SMTP id g24-20020a7bc4d8000000b00393fecd2718mr15770809wmk.23.1652097816382; Mon, 09 May 2022 05:03:36 -0700 (PDT) Date: Mon, 9 May 2022 12:03:28 +0000 In-Reply-To: <20220509120330.3043773-1-tabba@google.com> Message-Id: <20220509120330.3043773-3-tabba@google.com> Mime-Version: 1.0 References: <20220509120330.3043773-1-tabba@google.com> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog Subject: [PATCH v3 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_050339_366642_D0CBDFCC X-CRM114-Status: GOOD ( 11.75 ) 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 Reviewed-by: Oliver Upton --- 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 {