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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61638C4332F for ; Tue, 12 Dec 2023 17:18:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346658AbjLLRSS (ORCPT ); Tue, 12 Dec 2023 12:18:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232817AbjLLRSP (ORCPT ); Tue, 12 Dec 2023 12:18:15 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07F5A99 for ; Tue, 12 Dec 2023 09:18:22 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 426EBC433C8; Tue, 12 Dec 2023 17:18:19 +0000 (UTC) Date: Tue, 12 Dec 2023 17:18:17 +0000 From: Catalin Marinas To: Alexander Potapenko Cc: will@kernel.org, pcc@google.com, andreyknvl@gmail.com, andriy.shevchenko@linux.intel.com, aleksander.lobakin@intel.com, linux@rasmusvillemoes.dk, yury.norov@gmail.com, alexandru.elisei@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, eugenis@google.com, syednwaris@gmail.com, william.gray@linaro.org Subject: Re: [PATCH v9 4/4] arm64: mte: implement CONFIG_ARM64_MTE_SWAP_STATS Message-ID: References: <20231113105234.32058-1-glider@google.com> <20231113105234.32058-5-glider@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231113105234.32058-5-glider@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 13, 2023 at 11:52:33AM +0100, Alexander Potapenko wrote: > Provide a config to collect the usage statistics for ARM MTE tag > compression. This patch introduces allocation/deallocation counters > for buffers that were stored uncompressed (and thus occupy 128 bytes of > heap plus the Xarray overhead to store a pointer) and those that were > compressed into 8-byte pointers (effectively using 0 bytes of heap in > addition to the Xarray overhead). > > The counters are exposed to the userspace via > /sys/kernel/debug/mteswap/stats: > > # cat /sys/kernel/debug/mteswap/stats > 8 bytes: 102496 allocations, 67302 deallocations > 128 bytes: 212234 allocations, 178278 deallocations > uncompressed tag storage size: 8851200 > compressed tag storage size: 4346368 > > Suggested-by: Yury Norov > Signed-off-by: Alexander Potapenko Acked-by: Catalin Marinas