From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Upton Date: Wed, 26 Apr 2023 17:21:58 +0000 Subject: [PATCH v2 0/4] KVM: Refactor KVM stats macros and enable custom stat names In-Reply-To: <20230306190156.434452-1-dmatlack@google.com> References: <20230306190156.434452-1-dmatlack@google.com> Message-ID: List-Id: To: kvm-riscv@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Mar 06, 2023 at 11:01:52AM -0800, David Matlack wrote: > This series refactors the KVM stats macros to reduce duplication and > adds the support for choosing custom names for stats. > > Custom name makes it possible to decouple the userspace-visible stat > names from their internal representation in C. This can allow future > commits to refactor the various stats structs without impacting > userspace tools that read KVM stats. > > This also allows stats to be stored in data structures such as arrays, > without needing unions to access specific stats. Case in point, the last > patch in this series removes the pages_{4k,2m,1g} union, which is a > useful cleanup to prepare for sharing paging code across architectures > [1]. > > And for full transparency, another motivation for this series it that at > Google we have several out-of-tree stats that use arrays. Custom name > support is something we added internally and it reduces our technical > debt to get the support merged upstream. For the series: Reviewed-by: Oliver Upton -- Thanks, Oliver From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-4.mta1.migadu.com (out-4.mta1.migadu.com [95.215.58.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AFB9538A for ; Wed, 26 Apr 2023 17:22:08 +0000 (UTC) Date: Wed, 26 Apr 2023 17:21:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1682529725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yLWhzFr0IaFOP7oGWZVxeoPyLpaGebSmTPqngfIpZG0=; b=fX1xUvV2g81JM+0ABsdRcIjDsB/4E25/qjtfu0mosg0PvfMF9EHtEmDRZTz3iFWTYkK0dA 19FAfDwYGMolyePLVnuvhqZX1xWo1FbUgjHuNPt4/BF+tVLHSMDVjtXDd0o5kYB6/qHrji BF94HvG+MfWGhmnvQOaFbIcWpIUF+yQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: David Matlack Cc: Paolo Bonzini , Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Huacai Chen , Aleksandar Markovic , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Sean Christopherson , Michael Ellerman , Eric Farman , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Sathvika Vasireddy , Nicholas Piggin , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, kvm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 0/4] KVM: Refactor KVM stats macros and enable custom stat names Message-ID: References: <20230306190156.434452-1-dmatlack@google.com> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230306190156.434452-1-dmatlack@google.com> X-Migadu-Flow: FLOW_OUT On Mon, Mar 06, 2023 at 11:01:52AM -0800, David Matlack wrote: > This series refactors the KVM stats macros to reduce duplication and > adds the support for choosing custom names for stats. > > Custom name makes it possible to decouple the userspace-visible stat > names from their internal representation in C. This can allow future > commits to refactor the various stats structs without impacting > userspace tools that read KVM stats. > > This also allows stats to be stored in data structures such as arrays, > without needing unions to access specific stats. Case in point, the last > patch in this series removes the pages_{4k,2m,1g} union, which is a > useful cleanup to prepare for sharing paging code across architectures > [1]. > > And for full transparency, another motivation for this series it that at > Google we have several out-of-tree stats that use arrays. Custom name > support is something we added internally and it reduces our technical > debt to get the support merged upstream. For the series: Reviewed-by: Oliver Upton -- Thanks, Oliver From mboxrd@z Thu Jan 1 00:00:00 1970 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 D1035C7618E for ; Wed, 26 Apr 2023 17:22:21 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=05+jl+WvkNDIlWLwcg9pA+u6Ta62D98w/T/tO+YfWqE=; b=hB1r1sZUHMyg4m ZkUZLQNEHOtDFMnEwUvx4x5fk2BZ0QzIVpFIjYQl/BJqYgnXQt8rmxHvu7k8g4x1yAoA8zc1WWV3b RZcikhqUTNXelH67TQh2qYY+r6ohAK+My3ADxaZd82y3lzUaS1JdqfOaN3niM2U2MlF7/iohm6RO0 e8tg7tMHt42gcOGzy+tya2lLyyOPC6HpODnOnulSmABTpOjaWkGQUbK5epKK0DBvqynGehT9DsIHt FSSev5nhu6u9gz0XCMIKS1MEQDXbf7Q8vQHhVXlkJG5lbj4q07uofKc8wsCiK4K3s0dHNgETN8vWk WSswCSChjQDzFhywdatg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1priqN-004VOV-09; Wed, 26 Apr 2023 17:22:15 +0000 Received: from out-16.mta1.migadu.com ([2001:41d0:203:375::10]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1priqJ-004VNN-3C for linux-riscv@lists.infradead.org; Wed, 26 Apr 2023 17:22:13 +0000 Date: Wed, 26 Apr 2023 17:21:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1682529725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yLWhzFr0IaFOP7oGWZVxeoPyLpaGebSmTPqngfIpZG0=; b=fX1xUvV2g81JM+0ABsdRcIjDsB/4E25/qjtfu0mosg0PvfMF9EHtEmDRZTz3iFWTYkK0dA 19FAfDwYGMolyePLVnuvhqZX1xWo1FbUgjHuNPt4/BF+tVLHSMDVjtXDd0o5kYB6/qHrji BF94HvG+MfWGhmnvQOaFbIcWpIUF+yQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: David Matlack Cc: Paolo Bonzini , Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Huacai Chen , Aleksandar Markovic , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Sean Christopherson , Michael Ellerman , Eric Farman , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Sathvika Vasireddy , Nicholas Piggin , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, kvm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 0/4] KVM: Refactor KVM stats macros and enable custom stat names Message-ID: References: <20230306190156.434452-1-dmatlack@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230306190156.434452-1-dmatlack@google.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230426_102212_471761_9ACA4742 X-CRM114-Status: GOOD ( 14.08 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Mon, Mar 06, 2023 at 11:01:52AM -0800, David Matlack wrote: > This series refactors the KVM stats macros to reduce duplication and > adds the support for choosing custom names for stats. > > Custom name makes it possible to decouple the userspace-visible stat > names from their internal representation in C. This can allow future > commits to refactor the various stats structs without impacting > userspace tools that read KVM stats. > > This also allows stats to be stored in data structures such as arrays, > without needing unions to access specific stats. Case in point, the last > patch in this series removes the pages_{4k,2m,1g} union, which is a > useful cleanup to prepare for sharing paging code across architectures > [1]. > > And for full transparency, another motivation for this series it that at > Google we have several out-of-tree stats that use arrays. Custom name > support is something we added internally and it reduces our technical > debt to get the support merged upstream. For the series: Reviewed-by: Oliver Upton -- Thanks, Oliver _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 8F06EC77B78 for ; Wed, 26 Apr 2023 17:33:05 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Q65YW5yyCz3fRH for ; Thu, 27 Apr 2023 03:33:03 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=fX1xUvV2; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.dev (client-ip=2001:41d0:203:375::21; helo=out-33.mta1.migadu.com; envelope-from=oliver.upton@linux.dev; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=fX1xUvV2; dkim-atps=neutral X-Greylist: delayed 591 seconds by postgrey-1.36 at boromir; Thu, 27 Apr 2023 03:32:10 AEST Received: from out-33.mta1.migadu.com (out-33.mta1.migadu.com [IPv6:2001:41d0:203:375::21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Q65XV37fWz3cMy for ; Thu, 27 Apr 2023 03:32:10 +1000 (AEST) Date: Wed, 26 Apr 2023 17:21:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1682529725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yLWhzFr0IaFOP7oGWZVxeoPyLpaGebSmTPqngfIpZG0=; b=fX1xUvV2g81JM+0ABsdRcIjDsB/4E25/qjtfu0mosg0PvfMF9EHtEmDRZTz3iFWTYkK0dA 19FAfDwYGMolyePLVnuvhqZX1xWo1FbUgjHuNPt4/BF+tVLHSMDVjtXDd0o5kYB6/qHrji BF94HvG+MfWGhmnvQOaFbIcWpIUF+yQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: David Matlack Subject: Re: [PATCH v2 0/4] KVM: Refactor KVM stats macros and enable custom stat names Message-ID: References: <20230306190156.434452-1-dmatlack@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230306190156.434452-1-dmatlack@google.com> X-Migadu-Flow: FLOW_OUT X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, David Hildenbrand , Anup Patel , Paul Walmsley , linux-riscv@lists.infradead.org, Claudio Imbrenda , Janosch Frank , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Zenghui Yu , Palmer Dabbelt , Christian Borntraeger , Eric Farman , Albert Ou , Suzuki K Poulose , Nicholas Piggin , Sathvika Vasireddy , Atish Patra , kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Sean Christopherson , linux-mips@vger.kernel.org, James Morse , kvm-riscv@lists.infradead.org, Paolo Bonzi ni , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Mar 06, 2023 at 11:01:52AM -0800, David Matlack wrote: > This series refactors the KVM stats macros to reduce duplication and > adds the support for choosing custom names for stats. > > Custom name makes it possible to decouple the userspace-visible stat > names from their internal representation in C. This can allow future > commits to refactor the various stats structs without impacting > userspace tools that read KVM stats. > > This also allows stats to be stored in data structures such as arrays, > without needing unions to access specific stats. Case in point, the last > patch in this series removes the pages_{4k,2m,1g} union, which is a > useful cleanup to prepare for sharing paging code across architectures > [1]. > > And for full transparency, another motivation for this series it that at > Google we have several out-of-tree stats that use arrays. Custom name > support is something we added internally and it reduces our technical > debt to get the support merged upstream. For the series: Reviewed-by: Oliver Upton -- Thanks, Oliver From mboxrd@z Thu Jan 1 00:00:00 1970 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 E4790C7618E for ; Wed, 26 Apr 2023 17:23:08 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s1zgomTwQLzbfP/vxLqWEbk1Z+9w5Z604dMMgrDe5D0=; b=44fPb8SI3K+OEY 67n4ccaLCVpjAFfFFWTRruRHedCQqs9fqpKilOb4hI9eDPz5VDmKE+aaE738MdkPNQfsosWoNPpMe jzZ46wJNL8KA3J46YU/bV5r6QRzwbf+rNuEmz97ak4jjXtKR3IUXwonPxOsQUFGcai51T2Up/n55w U0M9dZTcw0BvwhPRDSdnYqSyM3lB9CD2qSHrQMnigZ7Lb7UKv8F20sFE5XPBPSTBNRlhrlpiub4ir sLAxYLb5+9FflrzwYJTS8IopOOON7QTZk/FVlxMe1JUpQU63h5dv3gvlUqs9u/AoDUNHxKwKUOIey bwgwGR2F3qql0MDjyOlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1priqS-004VQs-1S; Wed, 26 Apr 2023 17:22:20 +0000 Received: from out-8.mta1.migadu.com ([95.215.58.8]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1priqN-004VNO-0o; Wed, 26 Apr 2023 17:22:17 +0000 Date: Wed, 26 Apr 2023 17:21:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1682529725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yLWhzFr0IaFOP7oGWZVxeoPyLpaGebSmTPqngfIpZG0=; b=fX1xUvV2g81JM+0ABsdRcIjDsB/4E25/qjtfu0mosg0PvfMF9EHtEmDRZTz3iFWTYkK0dA 19FAfDwYGMolyePLVnuvhqZX1xWo1FbUgjHuNPt4/BF+tVLHSMDVjtXDd0o5kYB6/qHrji BF94HvG+MfWGhmnvQOaFbIcWpIUF+yQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: David Matlack Cc: Paolo Bonzini , Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Huacai Chen , Aleksandar Markovic , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , David Hildenbrand , Sean Christopherson , Michael Ellerman , Eric Farman , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Sathvika Vasireddy , Nicholas Piggin , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, kvm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 0/4] KVM: Refactor KVM stats macros and enable custom stat names Message-ID: References: <20230306190156.434452-1-dmatlack@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230306190156.434452-1-dmatlack@google.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230426_102215_434750_A94F729F X-CRM114-Status: GOOD ( 14.62 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 06, 2023 at 11:01:52AM -0800, David Matlack wrote: > This series refactors the KVM stats macros to reduce duplication and > adds the support for choosing custom names for stats. > > Custom name makes it possible to decouple the userspace-visible stat > names from their internal representation in C. This can allow future > commits to refactor the various stats structs without impacting > userspace tools that read KVM stats. > > This also allows stats to be stored in data structures such as arrays, > without needing unions to access specific stats. Case in point, the last > patch in this series removes the pages_{4k,2m,1g} union, which is a > useful cleanup to prepare for sharing paging code across architectures > [1]. > > And for full transparency, another motivation for this series it that at > Google we have several out-of-tree stats that use arrays. Custom name > support is something we added internally and it reduces our technical > debt to get the support merged upstream. For the series: Reviewed-by: Oliver Upton -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel