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 <[email protected]>
> Signed-off-by: Alexander Potapenko <[email protected]>
Acked-by: Catalin Marinas <[email protected]>