From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Date: Mon, 14 Jun 2021 09:51:21 +0000 Subject: Re: [PATCH 2/4] KVM: stats: Use binary stats descriptors for debugfs interface Message-Id: <1b57502b-116a-9be5-fa2f-1e8f5b5fce2d@redhat.com> List-Id: References: <20210614025351.365284-1-jingzhangos@google.com> <20210614025351.365284-3-jingzhangos@google.com> In-Reply-To: <20210614025351.365284-3-jingzhangos@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jing Zhang , KVM , KVMARM , LinuxMIPS , KVMPPC , LinuxS390 , Fuad Tabba On 14/06/21 04:53, Jing Zhang wrote: > + STATS_DESC_ICOUNTER_RONLY(VM, lpages), > + STATS_DESC_ICOUNTER_RONLY(VM, nx_lpage_splits), > STATS_DESC_ICOUNTER(VM, max_mmu_page_hash_collisions) I think we're now adding too many macros. max_mmu_page_hash_collisions is the only remaining instant counter that is not read-only. In fact, in the statsfs prototype we made all instant counters read-only. You could add a third type in addition to instant and cumulative, let's call it "peak". This essentially corresponds to the "max" aggregation function in the statsfs prototype. Then instant counters would be read only, while cumulative and peak would be read-write. Paolo