]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: selftest to verify zero-filled pages are mapped to zeropage
authorAlexander Zhu <alexlzhu@fb.com>
Fri, 30 Aug 2024 10:03:37 +0000 (11:03 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 9 Sep 2024 23:39:03 +0000 (16:39 -0700)
commit391e86971161906e720f5d3c110ca9124c14fb55
tree96c9df8daa62ca2fd7de6c476e0a04b66037704d
parentb1f202060afeb7fcb98473929d26fd3d2093b067
mm: selftest to verify zero-filled pages are mapped to zeropage

When a THP is split, any subpage that is zero-filled will be mapped to the
shared zeropage, hence saving memory.  Add selftest to verify this by
allocating zero-filled THP and comparing RssAnon before and after split.

Link: https://lkml.kernel.org/r/20240830100438.3623486-4-usamaarif642@gmail.com
Signed-off-by: Alexander Zhu <alexlzhu@fb.com>
Signed-off-by: Usama Arif <usamaarif642@gmail.com>
Acked-by: Rik van Riel <riel@surriel.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Domenico Cerasuolo <cerasuolodomenico@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kairui Song <ryncsn@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Nico Pache <npache@redhat.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Shuang Zhai <zhais@google.com>
Cc: Yu Zhao <yuzhao@google.com>
Cc: Shuang Zhai <szhai2@cs.rochester.edu>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/split_huge_page_test.c
tools/testing/selftests/mm/vm_util.c
tools/testing/selftests/mm/vm_util.h