On 08/01/2025 04:56, Andrew Morton wrote:
On Tue, 7 Jan 2025 14:25:53 +0000 Ryan Roberts ryan.roberts@arm.com wrote:
After commit b1f202060afe ("mm: remap unused subpages to shared zeropage when splitting isolated thp"), cow test cases involving swapping out THPs via madvise(MADV_PAGEOUT) started to be skipped due to the subsequent check via pagemap determining that the memory was not actually swapped out. Logs similar to this were emitted:
...
The commit in question introduces the behaviour of scanning THPs and if their content is predominantly zero, it splits them and replaces the pages which are wholly zero with the zero page. These cow test cases were getting caught up in this.
So let's avoid that by filling the contents of all allocated memory with a non-zero value. With this in place, the tests are passing again.
Thanks, I'll add
Fixes: b1f202060afe ("mm: remap unused subpages to shared zeropage when splitting isolated thp")
Thanks, given it's not really a bug but a deliberate change of behaviour I wasn't sure that a Fixes tag was appropriate, but thanks for seting me straight.
... Cc: Usama Arif usamaarif642@gmail.com Cc: Yu Zhao yuzhao@google.com Cc: stable@vger.kernel.org