linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Alexander Potapenko <glider@google.com>
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 3/4] arm64: mte: add compression support to mteswap.c
Date: Tue, 12 Dec 2023 17:17:38 +0000	[thread overview]
Message-ID: <ZXiVsiPj7iULFCY5@arm.com> (raw)
In-Reply-To: <20231113105234.32058-4-glider@google.com>

On Mon, Nov 13, 2023 at 11:52:32AM +0100, Alexander Potapenko wrote:
> Update mteswap.c to perform inline compression of memory tags when
> possible.
> 
> If CONFIG_ARM64_MTE_COMP is enabled, mteswap.c will attempt to compress
> saved tags for a struct page and store them directly in Xarray entry
> instead of wasting heap space.
> 
> Soon after booting Android, tag compression saves ~2x memory previously
> spent by mteswap.c on tag allocations. On a moderately loaded device with
> ~20% tagged pages, this leads to saving several megabytes of kernel heap:
> 
>   # 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
> 
> (statistics collection is introduced in the following patch)
> 
> Signed-off-by: Alexander Potapenko <glider@google.com>

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-12-12 17:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 10:52 [PATCH v9 0/4] Implement MTE tag compression for swapped pages Alexander Potapenko
2023-11-13 10:52 ` [PATCH v9 1/4] arm64: mte: implement CONFIG_ARM64_MTE_COMP Alexander Potapenko
2023-12-12 17:16   ` Catalin Marinas
2023-12-13 12:16     ` Will Deacon
2023-12-14  9:27       ` Alexander Potapenko
2023-11-13 10:52 ` [PATCH v9 2/4] arm64: mte: add a test for MTE tags compression Alexander Potapenko
2023-12-12 17:16   ` Catalin Marinas
2023-11-13 10:52 ` [PATCH v9 3/4] arm64: mte: add compression support to mteswap.c Alexander Potapenko
2023-12-12 17:17   ` Catalin Marinas [this message]
2023-11-13 10:52 ` [PATCH v9 4/4] arm64: mte: implement CONFIG_ARM64_MTE_SWAP_STATS Alexander Potapenko
2023-12-12 17:18   ` Catalin Marinas
2023-12-13 12:31 ` [PATCH v9 0/4] Implement MTE tag compression for swapped pages Will Deacon
2023-12-13 14:01   ` Alexander Potapenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZXiVsiPj7iULFCY5@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=alexandru.elisei@arm.com \
    --cc=andreyknvl@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=eugenis@google.com \
    --cc=glider@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=pcc@google.com \
    --cc=syednwaris@gmail.com \
    --cc=will@kernel.org \
    --cc=william.gray@linaro.org \
    --cc=yury.norov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).