[PATCH v9 0/4] Implement MTE tag compression for swapped pages

Will Deacon will at kernel.org
Wed Dec 13 04:31:30 PST 2023


On Mon, Nov 13, 2023 at 11:52:29AM +0100, Alexander Potapenko wrote:
> Currently, when MTE pages are swapped out, the tags are kept in the
> memory, occupying PAGE_SIZE/32 bytes per page. This is especially
> problematic for devices that use zram-backed in-memory swap, because
> tags stored uncompressed in the heap effectively reduce the available
> amount of swap memory.
> 
> The RLE-based algorithm suggested by Evgenii Stepanov and implemented in
> this patch series is able to efficiently compress fixed-size tag buffers,
> resulting in practical compression ratio of 2x. In many cases it is
> possible to store the compressed data in 63-bit Xarray values, resulting
> in no extra memory allocations.
> 
> This patch series depends on "lib/bitmap: add bitmap_{read,write}()"
> (https://lore.kernel.org/linux-arm-kernel/20231030153210.139512-1-glider@google.com/T/)
> that is mailed separately.

That's a shame, because it means I can't apply the series as-is:


arch/arm64/mm/mtecomp.c: In function ‘mte_bitmap_write’:
arch/arm64/mm/mtecomp.c:105:2: error: implicit declaration of function ‘bitmap_write’; did you mean ‘bitmap_free’? [-Werror=implicit-function-declaration]
  105 |  bitmap_write(bitmap, value, *pos, bits);
      |  ^~~~~~~~~~~~
      |  bitmap_free
arch/arm64/mm/mtecomp.c: In function ‘mte_bitmap_read’:
arch/arm64/mm/mtecomp.c:198:9: error: implicit declaration of function ‘bitmap_read’; did you mean ‘bitmap_remap’? [-Werror=implicit-function-declaration]
  198 |  return bitmap_read(bitmap, start, bits);
      |         ^~~~~~~~~~~
      |         bitmap_remap
cc1: some warnings being treated as errors
make[5]: *** [scripts/Makefile.build:243: arch/arm64/mm/mtecomp.o] Error 1


Do you really have such a hard dependency on those new bitmap ops?

Will



More information about the linux-arm-kernel mailing list