On Tue, 7 Jan 2025 14:25:53 +0000 Ryan Roberts <ryan.roberts@xxxxxxx> 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") ... Cc: Usama Arif <usamaarif642@xxxxxxxxx> Cc: Yu Zhao <yuzhao@xxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx>